Add canEdit function to user object.

Checks if currentUser included in the user string the provided object. The reason I check inclusion and not equality, is to support scenario of multiple users.
Only save query if the user can edit it.
Only unbind save shortcut if we're actually leaving the page.
Show warning of leaving the page only if the user can edit the query.
use currentUser.canEdit in more places