Support BitBucket as an auth provider

Summary: Ref T4251. See D9760, which fixes the root issue. See D9202 for discussion.

Test Plan: Authenticated with BitBucket.

Reviewers: btrahan, asherkin

Reviewed By: asherkin

Subscribers: epriestley

Maniphest Tasks: T4251

Differential Revision: https://secure.phabricator.com/D9761
Test cases should extend from `PhutilTestCase`

Summary: Currently, a few test cases in rPHU extend from `ArcanistPhutilTestCase` instead of `PhutilTestCase`.

Test Plan: This is a really minor change, but the unit tests still pass of course.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9787
Various minor improvements to the `xsprintf` functions

Summary:
- Renamed `Phutil*sprintfTestCase` classes to use proper camel case.
- Added some type hints for function parameters, where appropriate.
- Use more specific (SPL) `Exception` types, where appropriate.
- Change `##` to `\`` in comments.
- Wrap functions in `@{function:...}` when they appear in comments.

Test Plan: `arc unit` still works.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9788
Allow Remarkup rules to assert that attributes do not contain tokens

Summary: Remarkup rules can not safely use arbitrary text in attributes, as it
may be replaced with tags during text restoration. Resolve this in two ways:
first, allow rules to assert that variables contain only flat text. The next
patch also adjusts rule priorities so that embed rules fire before link rules.

Auditors: btrahan
Add isFlatText() for performing remarkup flat text tests

Summary: Add a method which lets rules check if text is flat.

Auditors: btrahan
Alphabetize `.arclint` linters

Summary: I'm a bit OCD with this, but I find the `.arclint` file easier to read if the keys are in alphabetical order.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9802
Add a `PhutilAWSS3Future` class

Summary: Ref T5155. This doesn't do anything currently, but should allow us to perform S3 operations without the [[http://undesigned.org.za/2007/10/22/amazon-s3-php-class/ | Amazon S3 PHP Class]].

Test Plan: I'm not really sure how to test this... if you have any ideas then please let me know.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5155

Differential Revision: https://secure.phabricator.com/D9781