Exclude existing items from autosuggest

Prior to this commit, the autosuggest box (for nodes, classes, groups)
would include already assigned elements in the suggestion dropdown. This
commit excludes the assigned elements from the query results when
searching for a new item.

NOTE: this implementation does still contain an edge case where a newly
assigned group may still be shown if the query has already been cached.
As a concrete example, groups `gamma` and `beta` have been assigned,
but `delta` and `alpha` have not. When `a` is typed into the group
assignment box, `delta` and `alpha` will be suggested. Assume `delta`
selected. When `a` is again typed, jquery.tokeninput plugin will notice
that the query results for `a` have already been cached and show them
again, both `delta` and `alpha` in this case even though `delta` was
assigned moments ago. This is a limitation in the jquery.tokeninput
plugin in that it allows custom code to be inject upon query results,
but not upon cache results. A separate un-cached query, such as `l` in
this case, will not exhibit this behaviour, resulting in only `alpha`
being suggested.
refactor embedded autosuggest javascript to func

Prior to this commit, the javascript function for filtering autosuggest
results lived as a interpolated string in a ruby helper. This commit
moves the core logic of that function out to a higher order function
that takes the input class, still available from the ruby helper, and
returns a function that filters on that specific class.
Merge pull request #217 from jeffweiss/only_autosuggest_new_things

Exclude existing items from autosuggest