restored loading indicator for EntitySelector

part of the transition from jQuery UI Autocomplete to Typeahead
consolidated internals
restored support for custom error message

part of the transition from jQuery UI Autocomplete to Typeahead