Fix daemon task queue to respect task priority

Summary:
Fixes an issue with T5336 / D9871. We did 99% of the work here but didn't actually turn on the priority sorting. The unit test passed by default, which didn't catch this.

  - Fix the unit test (it failed).
  - Fix the query (test now passes).
  - Add a "Next in Queue" element to the UI to make this kind of thing easier to spot/understand.

Test Plan: Ran unit test. Viewed "Next in Queue". Queued some tasks, flushed the queue. Web UI tracked the state sensibly.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: cburroughs, epriestley

Differential Revision: https://secure.phabricator.com/D10766
Apple remarkup-code padding to child spans as well.

Summary: Fixes T6440. The issue is when a nested span appears, we don't apply the spacing.

Test Plan: Test a new diff in my sandbox that exhibits the issue. Ensure spacing now aligns.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6440

Differential Revision: https://secure.phabricator.com/D10768
Document the adjustment workflow and warn users about adjusting old MySQL

Summary: Ref T1191. Explain the adjustment workflow, how to resolve common errors, etc.

Test Plan: Read it, clicked doc links.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10758
Update some storage documentation for new adjustment workflows

Summary: Ref T1191. General update of this document, which remains mostly accurate. Remove a warning.

Test Plan: Read document.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10760
Write bug report, feature request and code contribution guides

Summary:
Fixes T6347. This refines the "contributor guide" documents to basically lock down support further. Notable changes in policy:

  - Bugs: Emphasis on reproduction steps, strong emphasis on using Maniphest. Emphasis on what we support.
  - Features: Emphasis on describing problems instead of solutions, emphasis on realistic expecations about timelines. Strong emphasis on using Maniphest.
  - Code: Strong emphasis on coordinating with us first. No GitHub pull requests. Emphasis on us ignoring contributions we don't have time to deal with. Suggests local forks.

Test Plan: Read these through; let me generate them and take some screenshots for easier reading.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6347

Differential Revision: https://secure.phabricator.com/D10764
Include object url in object selector selection

Summary: Fixes T6452, provides actual href instead of just #

Test Plan: Control click and open link in new window, is correct task. Click and see item added to selection list.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6452

Differential Revision: https://secure.phabricator.com/D10774
Make loading large changesets slightly easier

Summary: Fixes T3942, turns the load links into buttons.

Test Plan: Set my limit to 1, test page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T3942

Differential Revision: https://secure.phabricator.com/D10775
Update to FontAwesome 4.2.0

Summary: Update the the lastest version, adds payment icons, reduced woff file sizes

Test Plan: load icon examples

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6376

Differential Revision: https://secure.phabricator.com/D10778
Apply Source Sans Font to PHUI Document Preview Skin

Summary: Fixes T5767

Test Plan: Tested Phriction, Legalpad. Edited a few documents.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5767

Differential Revision: https://secure.phabricator.com/D10779
Do a better job of handling spec errors during schema adjustment

Summary:
Ref T1191. Currently if a developer forgot to specify a column type, `storage adjust` aborts explosively mid-stream. Instead:

  - Make this a formal error with an unambiugous name/description instead of something you sort of infer by seeing "<unknown>".
  - Make this error prevent generation of adjustment warnings, so we don't try to `ALTER TABLE t CHANGE COLUMN c <unknown>`, which is nonsense.
  - When schemata errors exist, surface them prominiently in `storage adjust`.

Overall:

  - Once `storage upgrade` runs `storage adjust` automatically (soon), this will make it relatively difficult to miss these errors.
  - Letting these errors slip through no longer escalates into a more severe issue.

Test Plan:
Commented out the recent `mailKey` spec and ran `storage adjust`:

```
$ ./bin/storage adjust --force
Verifying database schemata...
Found no adjustments for schemata.

Target                                            Error
phabricator2_phriction.phriction_document.mailKey Column Has No Specification

 SCHEMATA ERRORS

The schemata have serious errors (detailed above) which the adjustment
workflow can not fix.

If you are not developing Phabricator itself, report this issue to the
upstream.

If you are developing Phabricator, these errors usually indicate that your
schema specifications do not agree with the schemata your code actually
builds.
```

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10771
Allow Javelin initBehavior to source alternative library behaviors

Summary: Ref T6467.  Opens up initBehavior for non-phabricator sourced behaviors.

Test Plan: Confirmed no impact on unset (default 'phabricator' source name) calls to initBehavior

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: aklapper, Korvin, epriestley

Maniphest Tasks: T6467

Differential Revision: https://secure.phabricator.com/D10780
Make default and hidden columns in Workboards more clear

Summary: Fixes T6469. Changes the default icon into text instead. Added the text to hidden boards and now display when reordering as well.

Test Plan:
Moved a bunch of columns, tested reordering. Seems more clear.

{F229626}

{F229627}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6469

Differential Revision: https://secure.phabricator.com/D10784
Update Font Awesome .woff path

Summary: We're having trouble with this pointing at the wrong file after D10778; I assume that making it match the others is the proper fix...

Test Plan: Crossed fingers.

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10785
Style feed stories with phabricator-remarkup

Summary: Fixes T6316. Wraps feed content in remarkup.

Test Plan: Post a comment with a quote on Task, go to Feed and see the quote properly styled.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6316

Differential Revision: https://secure.phabricator.com/D10788
Clarify mail_handler.php setup instructions

Summary: While not explicitly misleading, this document can do a better job of covering the common/modern case.

Test Plan: Read document.

Reviewers: rush898, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10783
Change usernames to `sort64` to make them case-insensitive

Summary: Ref T1191. After adjustment, usernames currently end up case-sensitive, which means `alincoln` and `Alincoln` are different users. Make them case-sensitive so these names collie.

Test Plan: Ran `bin/storage adjust`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10786
Phriction - move delete to modern editor + transactions

Summary:
Ref T4029. Much like D10756 this does the bare minimum to get things in there. I have a sticky with "TODOs" about moving the error-checking business logic into the editor in both cases.

Up next - move actions...

Test Plan: deleted a document and it worked! verified proper feed story.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: shadowhand, Korvin, epriestley

Maniphest Tasks: T4029

Differential Revision: https://secure.phabricator.com/D10761
Phriction - move "move" to modern editor + transactions

Summary:
Ref T4029. Much like D10756, D10761 this does the bare minimum to get things in there. I have a sticky with "TODOs" about moving the error-checking business logic into the editor in all three cases.

Up next - policy...

Test Plan: moved a document and it worked! verified no feed story. verified both documents involved looked good

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4029

Differential Revision: https://secure.phabricator.com/D10763
Give Almanac generic, custom-field-based properties

Summary:
Ref T5833. Currently, we have an `AlmanacDeviceProperty`, but it doesn't use CustomFields and is specific to devices. Make this more generic:

  - Reuse most of the CustomField infrastructure (so we can eventually get easy support for nice editor UIs, etc).
  - Make properties more generic so Services, Bindings and Devices can all have them.

The major difference between this implementation and existing CustomField implementations is that all other implementations are application-authoritative: the application code determines what the available list of fields is.

I want Almanac to be a bit more freeform (basically: you can write whatever properties you want, and we'll put nice UIs on them if we have a nice UI available). For example, we might have some sort of "ServiceTemplate" that says "a database binding should usually have the fields 'writable', 'active', 'credential'", which would do things like offer these as options and put a nice UI on them, but you should also be able to write whatever other properties you want and add services without building a specific service template for them.

This involves a little bit of rule bending, but ends up pretty clean. We can adjust CustomField to accommodate this a bit more gracefully later on if it makes sense.

Test Plan: {F229172}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10777
Allow Almanac Devices and Bindings to have properties

Summary:
Ref T5833. Adds support for arbitrary properites to Almanac devices and bindings.

  - For Devices, this allows you to maybe mark what `rack` a server is on, the `serial` number of a router, etc.
  - For Bindings, this allows you to maybe mark that a bound device is `active`, provide `credentials`, expose it as `readonly`, etc.

Test Plan: Added properties to Devices and Bindings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

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