There have been cheers and applause at the end of a fierce shootout, which saw a man who kept Boston on edge for days, caught and taken into custody.