Port search box/search page to DOM.

Also make custom elements for some form elements, and
sprites. Refactor some search-related code.