(bug 4062) Initial OAuth implementation

This currently does not allow anyone to use OAuth to auth anywhere
but allows the OAuth token process to work.
(bug 4062) Fix protocol version related code
(bug 4062) Fix various concerns
(bug 4062) Refactor code to remove indent
(bug 4062) Missed explicit protocol_version
[#743] Allow emailed entries to have too-long subjects

Instead of failing with a message, just post with a truncated subject
Add metadata to interestdata

Add some basic user metadata (id and journaltype) to the output of
/misc/interestdata. This metadata is added in comments for compatibility
with existing clients that use this data.
Merge pull request #747 from Sophira/add-metadata-to-interestdata

Add metadata to interestdata
Merge pull request #743 from afuna/allow-long-subjects-in-email-bug-743

Allow long subjects in emailed entries
Merge pull request #506 from anall/feature/bug4062

OAuth stuff