Bug 1041026 - Move search bar logic into custom view

If we need to override the down/back button as well, this looks helpful: http://stackoverflow.com/a/5119485