Various fixes and send dialog integration

I've started to use this code for an app I'm building. About a year ago I used the - then childBrowser based - predecessor of this code, a lot has changed since than.
I've found a few bugs and cleaned up whitespace as I tried to make this work, those commits are the bulk of this request.
I've also added support for the [new send dialog](https://developers.facebook.com/docs/sharing/reference/send-dialog), since my application needs that.

If all this is too much in one go I can create separate patches / PRs, just let me know what would you like to merge.