Show in space's sidebar when a user was invited to join the space

Added a button at the top of the sidebar in spaces to join when the current
user was already invited to join the space and improved the button that was
already shown when the user already asked to join the space.

refs #1067
Small fix in SpacesHelper#space_join_button after 5ae7b41c0

refs #1067
Better redirects when a user has pending join requests

When a user tries to access a space and gets a 403:
* If he already asked to join the space, show the new join request page with
  a warning that he already sent a join request
* If the was already invited to join the space, redirect to the page to accept
  or decline the join request
* No join request pending, send him to create a new join request
* No user logged in, show the 403 error

refs #1067
Disable new join request form if the user already has an invitation

Was already being disabled if the user had a request, but not for an
invitation.

refs #1067
Notify space admins in the sidebar when there are pending join requests

refs #1067
Add link for users to cancel a pending join request they sent

rs #fe1067
Merge branch 'branch-v2-1067-show-invitations' into branch-v2

refs #1067

Conflicts:
	app/controllers/join_requests_controller.rb
	app/helpers/spaces_helper.rb
	app/models/space.rb
Go to a space's home when clicking on its name or logo
Show spaces with pending requests in the user's home page

Shows all spaces to which the user sent a join request or from which a user
received an invitation.

refs #1067
Improve the layout of space thumbnails a bit

A bit cleaner than before.