In-line Analytics

PR for internal review purposes as prelude for PR to upstream
    PR'd against copy of upstream master.

Known issues to be fixed later:
- Styling is embedded in html file as prelude to re-styling
- No tests
- pep8 and pylint not looked at yet.

@jbau @jrbl @stvstnfrd @caesar2164 if you please.
The docstring should probably be updated to reflect the actual return value of the function.

Also, the function should probably be renamed to reflect that it gives you more than just the problem type. Perhaps ```get_problem_info``` ?

Since you appear to be just using the tuple to fill out a dictionary, you may consider whether it would be more convenient to return a dictionary from this function, and then up above you can say (assuming the rename to get_problem_info):
```
# Determine type of problem for in-line analytics.
problem_info_for_block = get_problem_info(block)
staff_context = { #yadda yadda yadda }
staff_context.update(problem_info_for_block)
```
....but it's your call, since the update() scheme might be more confusing in the context of static dict declarations already being scattered around the codebase.