Fix scoping issue on signup

closes #2429
Refactor the Ghost Editor

issue #2385, issue #2108

- Separate out the various objects which form the editor into their own
  modules
- Decouple the modules where possible
- Rename and reshuffle bits of modules for consistency
- Minimise public APIs of the modules, and ensure they are consistent
- Add comments to the modules
Upgrade CodeMirror

closes #2108

- upgrade to 4.0.1
- requires removing the deprecated setLine method
Fix undo bug

issue #2436
Merge pull request #2398 from ErisDS/cm-refactor

CodeMirror Refactor & Upgrade
Force preview to scroll to the end

fixes #958, fixes #535

- If the cursor is within the last 5 lines, then scroll to the end of the preview window, rather than using a ratio
Merge pull request #2428 from Decad/master

Fix scoping issue on signup
Merge pull request #2437 from ErisDS/cm-scroll

Force preview to scroll to the end
Add shim for codemirror on touchscreens

fixes #2385

- stolen the CM shim from js-bin
- if we're on a touchscreen device, don't use CM
- if we're on a touchscreen device, show a coming soon message for uploads
Merge pull request #2438 from ErisDS/cm-mobile

Add shim for codemirror on touchscreens
Fixes modal fading inconsistency problem by disabling jQuery's
transition and allowing CSS to do its thing

closes #2400
- Removed fadeIn, jQuery's animation
- Added show(), which only manages display, giving transitions to CSS
Merge pull request #2405 from nicksahler/master

Fixed modal inconsistent fade problem
Add XML-RPC ping

closes #2148
- Added core/server/xmlrpc.js
- Hook into post::saved to ping when a published post gets saved
- Added node package to hook into http requests