Set the current user on the client side through gon

This is an attempted fix fo #4028.

A before_filter was created, and app.js was updated to take user information from preloads.user.

This seem to work in development mode. The headers & user info appear correctly and the js views are rendering OK.

However this PR breaks a lot of jasmine test, because:

TypeError: app.currentUser is undefined in http://localhost:8888/assets/app/views.js?body=true (line 27)

I couldn't figure out why. Please take a look at it.