use HTML5 autofocus attribute and the helper should_autofocus_on_search_box? to determine if a search box should be autofocused or not.

fixes #584