Increase bloodhound fetch limit to 10  (fix PMT #98169)

Also, moves the typeahead code out of the templates.