Process Remarkup in text and HTML email bodies appropriately

Summary: Ref T2617, adding inline styles to handle html email objects

Test Plan: Add code block to a Maniphest comment. Email should show pretty yellow background for code block.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T2617

Differential Revision: https://secure.phabricator.com/D10860
Disallow `[1]` from being interpreted as a marked checkbox in remarkup

Summary: Fixes T6640. `[1]` and similar are more likely footnotes than checkmarks.

Test Plan: {F241922}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6640

Differential Revision: https://secure.phabricator.com/D10913
Minor linter fix

Summary: Self-explanatory

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10942
Support an explicit connection timeout parameter for database connections

Summary:
Ref T6238. On the instance management interface, I want to check if an instance's database is reachable by connecting to it.

If it isn't, we hang for 30-60 seconds (default connection timeout). Allow explicit specification of a timeout when establishing a connection instead.

This only does MySQLi, not MySQL. We don't need MySQL for now, although it would be nice to support it eventually (Ref T6710).

Test Plan:
  - Browsed around.
  - Used short timeouts to get instance database status in instance management.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6238, T6710

Differential Revision: https://secure.phabricator.com/D10944
Allow ConduitClient to specify an explicit Host

Summary:
Ref T2783. To query a repository, we want to connect to a node which hosts it, but also connect using the correct instance hostname.

Allow `ConduitClient` to specify an explicit hostname.

Test Plan:
Used a script like this to verify that `setHost()` is impactful:

```
<?php

require_once 'scripts/__init_script__.php';

$response = id(new ConduitClient('http://127.0.0.1/'))
  ->setHost('local.phacility.com')
  ->callMethodSynchronous('conduit.ping', array());

var_dump($response);
```

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D10960
Use more liberal whitespae detection for `%%%` and `---` remarkup rules

Summary: This relaxes detection of whitespace for literal blocks and horizontal lines. In particular, when these rules are quoted, they appear as, e.g., `> ---`, which currently does not show a quoted horizontal line.

Test Plan: Added and ran unit tests. Quoted literal and HR rules.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10972
Preserve whitespace more faithfully when processing %%% remarkup blocks

Summary:
This improves the output for some edge cases with `%%%` blocks. Notably, blocks did not emit a block-level spacing tag, so this:

```
%%%a%%%
%%%b%%%
```

...rendered on a single line.

Test Plan:
Added unit tests.

{F249620}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chasemp, epriestley

Differential Revision: https://secure.phabricator.com/D10984
Support Conduit tokens in ConduitClient

Summary: Ref T5955. Allow ConduitClient to use simple token-based authentication.

Test Plan:
```
$ cat conduit.php
<?php

require_once 'scripts/__init_script__.php';

$args = new PhutilArgumentParser($argv);
$args->parseStandardArguments();

$result = id(new ConduitClient('http://local.phacility.com'))
  ->setConduitToken('api-6br7udiaydzjxorsr4ooggtzissh')
  ->callMethodSynchronous('user.whoami', array());

var_dump($result);
$ php -f conduit.php -- --trace
>>> [0] <conduit> user.whoami() <bytes = 117>
>>> [1] <http> http://local.phacility.com/api/user.whoami
<<< [1] <http> 216,804 us
<<< [0] <conduit> 217,307 us
array(6) {
  ["phid"]=>
  string(30) "PHID-USER-cvfydnwadpdj7vdon36z"
  ["userName"]=>
  string(5) "admin"
  ["realName"]=>
  string(4) "asdf"
  ["image"]=>
  string(85) "http://local.phacility.com/res/1410737307T/phabricator/3eb28cd9/rsrc/image/avatar.png"
  ["uri"]=>
  string(35) "http://local.phacility.com/p/admin/"
  ["roles"]=>
  array(4) {
    [0]=>
    string(5) "admin"
    [1]=>
    string(8) "verified"
    [2]=>
    string(8) "approved"
    [3]=>
    string(9) "activated"
  }
}
```

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5955

Differential Revision: https://secure.phabricator.com/D10987
Merge branch 'master' of https://github.com/christopher-johnson/libphutil