Add dust to homepage

Summary: With the jump panel re-format, lets move to dust on the homepage for depth.

Test Plan: Tested Chrome Mac and PC

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5524
Provide a local cache for PhabricatorEnv

Summary: We hit some env config fairly often (~200 calls on the home page) and it's not especially cheap right now. This saves about 10ms on home, which is ~8% of the page weight on my machine.

Test Plan: Clicked around, everything seemed fine. Unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5512
Improve remarkup performance (Phabricator)

Summary: As we've moved more remarkup logic post-cache (e.g., to implement policy-aware rules), we're paying more of a price for it. Improve performance in Phabricator by sharing engine instances where possible.

Test Plan: With next diff, this drops 75% of the cost of markup handling in Conpherence.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5510
Consolidate Conpherence frame rendering

Summary: Conpherence frame rendering is spread out a bit across ConpherenceController, ConpherenceListController, and previously ConpherenceNewController. I want to let the Thread and Widget controllers render the frame for mobile. Ref T2421.

Test Plan: Viewed conpherences, switched between conpherences.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5501
Move first-thread selection to the client in Conpherence

Summary: Ref T2421. For mobile, we don't want to select the first thread, since we'll just show a list of threads. Move this behavior to the client and do it when the page is shown on a desktop (or the view is changed to a desktop).

Test Plan: Viewed `/conpherence/`, saw first thread selected. Switched threads.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5502
Make id/phid Conpherence stuff more consistent

Summary:
Currently, `selected_conpherence_id` is actually a PHID. Instead, use ids everywhere.

Also, use replaceState instead of pushState. This means "back" takes you out of conpherence (not back to the last thread you looked at) but I think that's more consistent with user expectation.

Test Plan: Loaded thread list, loaded specific thread.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5503
Fix some bad merging; I landed an old branch for D5502.

Auditors: btrahan
Render Conpherence threads as a separate menu inside the layout, not a side nav

Summary: Currently, the thread list is in a standard side nav, but that makes it awkward to render (rendering logic needs to live in the base controller) and gives it some bad beahviors (like autohiding on mobile). Instead, move it into its own view and make it a little more custom. Ref T2421.

Test Plan: {F38098}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5504
Add layout roles and CSS rules for devices for Conpherence

Summary: Currently, `/conpherence/` shows the widget panel on devices. Make it show the thread list instead.

Test Plan: {F38099}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5505
Add "thread" role and allow threads to render without thread lists

Summary: The actual layout on mobile is a bit silly since the thread ends up being like 5px tall for now, but it technically works. Ref T2644.

Test Plan: {F38106}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5506
Fill thread list on thread view in Conpherence

Summary:
When we access `/conpherence/view/2/` on the desktop, load the thread on the initial response and ajax in the thread list. Basically, the idea is:

  - When we load the thread list, an individual thread, or the widget panel, we send back the piece the user asked for in the response.
  - On mobile, we stop there: we don't ajax in anything else, and just hide the other parts of the layout.
  - On Desktop, we fill out the other layout components via Ajax.

Ref T2421.

Test Plan: Hit `/conpherence/view/2/`, got a full page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5507
Replace `/conpherence/N/` with `/conpherence/view/N/`.

Summary:
  - Move `/N/` to `/thread/N/`.
  - Move `/view/N/` to `/N`/.
  - This makes the mobile "Conpherence -> click thread -> see thread" workflow work correctly. This also makes permalinks work correctly on mobile.

Ref T2421.

Test Plan: Clicked flows on desktop, mobile.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5508
Add platform detection and a Windows-specific monospaced font override

Summary: Use UA strings to detect platform; override general monospaced settings with platform-specific ones. Fixes T2868.

Test Plan: whatcouldgowrong

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2868

Differential Revision: https://secure.phabricator.com/D5526
Merge branch 'master' of http://github.com/facebook/phabricator