Ask for publish_actions if necessary when 'Share to Facebook' is invoked.

Move post badge logic out of Facebook controller and into js return script.
FB controller checks for publish_actions permission and passes that info down in an instance variable.

JS calls FB.login() if necessary to ask for the permission and checks if it was granted.
If yes, FB.api() is used to post the badge.
If not, nothing happens.

If permission is already granted, FB.api() is used to post the badge.

References Coursemology/coursemology.org#179.