Fix query validation of numbers. Closes #1832

Queries such as `404` were failing to validate because the query validator was treating them as JSON. This fix looks for a leading `{` to decide if the input is an attempted DSL query input.

Also:
- moves the validator into components
- breaks out fromUser and toUser into modules
- Adds tests for fromUser and toUser
- coerces numbers into strings when going from model to view
Maybe we should move this require statement into the kibana controller, so that it's always loaded.