Add autocompletion for Rails 4

I took and adapted the autocomplete file from the rails3 plugin to be up to date with Rails 4.