Fix mini profiler's redirect when redirecting to URLs w/ hash fragments.

Summary: Fixing mini profiler redirect and setting up arcconfig for mini profiler repo

Test Plan:
Login as admin
Go to /redirects
Create three redirects, pointing from...
  /r/t1 to https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/email-transparency#TOC-Kickoff-email-from-the-start-of-our-email-transparency-experiment
  /r/t2 to https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/email-transparency?monkey=bunkey&gorilla=donkey
  /r/t3 http://google.com
  /r/t4 http://localhost:8080/r/t3

...that was four redirects, tricked ya.

Now go to all three of those /r/t{n} URLs and verify that the URLs are always valid:
  in t1's case, there should be an mp-r-id querystring parameter inserted before the hash/fragment
  in t2's case, there should be an mp-r-id querystring parameter tacked onto the end of the URL
  in t3's case, there should be an mp-r-id querystring parameter tacked onto the end of the URL
  in t4's case, there should be an mp-r-id querystring parameter with *two* values, comma-separated, tacked onto the end of the URL.

TODO(kamens): unit test this sucker

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D4454
Allow hiding mini profiler (for demos, etc)

No interface for this yet.

Test Plan:
Ran `document.cookie = 'g-m-p-hide=1';` in the console and the profiler disappeared on the next page load.
Merge pull request #67 from Khan/hide

Allow hiding mini profiler (for demos, etc)
Add line-by-line profiling option

Summary:
This ports the functionality I originally wrote for
flask_debugtoolbar_lineprofilerpanel to work with the mini profiler.

{F6708}

See the original here: https://github.com/phleet/flask_debugtoolbar_lineprofilerpanel

Coded in Oslo, Norway.

Test Plan:
With this patch applied, point your browser to your site with the mini profiler
enabled, open up one of the request profiles, then under "settings", choose
"line-by-line" as the CPU profiling option.

Reload the page. Opening up the profile details, you should be presented with
a message saying:
```
To mark functions for profiling, put this in the source of the file containing
the function you want to profile:

    from gae_mini_profiler import linebyline_profiler
    linebyline_profiler.line_profile(SomeClass.some_instance_method)
    linebyline_profiler.line_profile(some_other_function)
```

In KA's case, the profiler needs to be imported through third_party, so the
actual import becomes `from third_party.gae_mini_profiler import
linebyline_profiler`.

Choose a function that gets executed 1 or more times when loading the profiler,
then follow the above instructions to mark it for profiling. Reload your
browser.

Opening up the profile details now, you should see a table presenting the
line-by-line results.

Go back to your code and remove the profiling code. Reload the browser, and the
details should revert back to the message explaining how to mark functions.

Reviewers: ben

Reviewed By: ben

CC: alpert, chris

Differential Revision: http://phabricator.khanacademy.org/D4819
Add import guard and installation instructions on line profiler for non OSX users

Test Plan:

On OSX, load up a page with the profiler turned on and change the profiling mode to line-by-line.
You should see usage instructions as normal.

Now replace the `_line_profiler.so` file with a garbage file, e.g. like this:
```
echo 'garbage' > _line_profiler.so
```
This is to emulate wrong architecture trying to be loaded.
Reload the page in browser, and you should be presented with a message similar to this once you expand the profiling results:

```
Could not load line_profiler c extension.

Try installing it like so:
  sudo pip install line_profiler==1.0b3
  (cd / && cp `python -c 'import _line_profiler; print _line_profiler.__file__'` /Users/jlfwong/khan/webapp/third_party/gae_mini_profiler)
```

Except with the paths customized for your installation.
Run the commands, reload the page, and you should see usage instructions again.
Add line-by-line support to old dev_appserver

Summary: I haven't tested this in 1.8 but it uses the same code as webapp/config_jinja.py does to allow _ctypes and gestalt so I assume it works.

Reviewers: jlfwong

Reviewed By: jlfwong

Differential Revision: http://phabricator.khanacademy.org/D5236
Merge pull request #69 from kamens/jlfwong-so-find

Add import guard and installation instructions on line profiler for non OSX users
Merge remote-tracking branch 'upstream/master' into remove_devserver_special_treatement
Remove comment which no longer is applicable