Use HTML message snippets for basket flash messages

Requires a few fiddly changes to basket views, and a slight change to
how ui.js renders flash messages from AJAX requests.