Port and enhance base Search view

The enhancements include:
- trimming the query string
- triggering a 'search' event when the query string changes
- preventing consecutive redundant queries from triggering
- prevent other events from firing (such as submit)

Signed-off-by: Byron Ruth <b@devel.io>
Bind to page visibility to pause/resume session ping

Signed-off-by: Byron Ruth <b@devel.io>