Resolve LDAP registration DAO exception due to empty username

Summary:
When logging in as an LDAP user for the first time (thus registering), a DAO exception was being thrown because PhabricatorLDAPRegistrationController wasn't passing in a username to PhabricatorUser::setUsername().

Somewhat separately, since either the PHP LDAP extension's underlying library or Active Directory are returning attributes with lowercased key names, I have to search on sAMAccountName and look for the key samaccountname in the results; this is fine since the config allows these to be defined separately. However I found that PhabricatorLDAPProvider::retrieveUserName() was attempting to use the search attribute rather than the username attribute. This resolves.

Test Plan: Tested registration and login against our internal AD infrastructure; worked perfectly. Need help from someone with access to a functional non-AD LDAP implementation; I've added the original author and CCs from D2722 in case they can help test in this regard.

Reviewers: epriestley, voldern

Reviewed By: voldern

CC: voldern, aran, Korvin, auduny, svemir

Differential Revision: https://secure.phabricator.com/D3340
Minor: Make the Matrix characters backwards as they should be.
Split paste create/edit and list views

Summary:
We have this hybrid "create / last few pastes" landing screen right now but I ~never use the list at the bottom and it makes the controller kind of complicated. I want to let you edit pastes too, and this generally simplifies things.

Also makes the textarea monospaced and cleans up the fork logic a bit.

Test Plan: Created, forked pastes. Viewed paste lists. Viewed pastes.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1690

Differential Revision: https://secure.phabricator.com/D3375
Allow pastes to be edited

Summary: Permits the name and langauge of a paste to be edited. This will eventually allow the visibility policy to be edited as well.

Test Plan: Edited name/langauge of some pastes. Tried to edit a paste I didn't own, was harshly rebuffed.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1690

Differential Revision: https://secure.phabricator.com/D3376
Allow pastes to be flagged

Summary:
This does a few things:

  - Allows you to flag pastes. This is straightforward.
  - Allows Applications to register event listeners.
  - Makes object action lists emit a 'didrenderactions' event, so other applications can add more actions. The Flags application injects its action in this way. This should generally make it much easier to add actions to objects when we add new applications, with less code duplication and better modularity. We have a really hacky version of this in Differential that I want to get rid of in lieu of this more general approach. I'm going to make object lists do the same thing, so any application can jump in and add stuff.

Test Plan: Flagged and unflagged pastes. Viewed home page, differential, flags list.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3377
Add 'paste.query' conduit method and deprecate 'paste.info'

Summary:
  - Modernize the Paste Conduit API.
  - Deprecate 'paste.info'.
  - Make queries policy-aware.
  - Move methods into the application to support greater modularity.

Test Plan: Made `paste.query`, `paste.info`, `paste.create` calls. Browsed Paste interfaces. Forked a paste.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3379
Redirect instead of 400 from file on wrong domain

Summary: We recently opted for 'security.alternate-file-domain' and we have some hotlinks to the original domain.

Test Plan: Enabled 'security.alternate-file-domain', observed redirect.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3380
Display calendar
Fix "where is symbol" ircbot handler

Summary: In my haste, I forgot a trailing ?

Test Plan: Try both "Where is Derp?" and "Where in the world is Derp?"

Reviewers: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D3387
Merge pull request #190 from KorvinSzanto/master

Fix "where is symbol" ircbot handler
Merge remote branch 'facebook/master'