Add middleware for canvas apps:

I created a middleware instead of a series of decorators for the canvas.

The reason for this is that the signed_request parameter is sent by facebook only when facebook sends the user to the app, not during navigation. 

This explains also in part the "Somehow facebook does give perms" error. In this case, what should be done is to redirect the user to login dialog and if the user has already authorized the app, it will send the signed_request parameter with the token to get the permissions.

I made a rebase, so we have only 1 commit.

add memcache to development requirements, otherwise tests fail with ImportError: No module named memcache
add middleware for canvas
if referer not facebook, we pass
add error denied detection
redirect user when app not authorized
connecting user when permissions are given
add verification for same user
checking for permisions
changed behavior for error in order to reauthenticate
made pep8 complaint