Namecomplete usability enhancements

* Nickname select box now appears as soon as the trigger key (default `@`) is pressed
* Up/Down arrow keys in select box no longer allow you to scroll off the top or bottom
* Fixed off-by-one error that was causing autocomplete to ignore the last character typed

This PR also includes whitespace cleanup and JSHint fixes.

Ping @mweibel @troymccabe Review please?