simple-markdown: some small compatibility fixups

Summary:
Makes `codeBlock`s gobble up trailing newlines,
Makes single item lists paragraphs if they have block-level elements
inside them (as designated by double newlines)

Test plan:
Added a code in lists test to `make test`

Auditors: emily
simple-markdown: allow multiple spaces after * in lists

Summary:
Especially relevant for tabs after the * in lists. This
is how marked.js works

Test plan:
`make test`

Auditors: emily
simple-markdown: fix extra newline after list items

Summary:
Strips the trailing '\n' seen in simple list items.
This makes cross-testing with marked.js a bit easier

Test plan:
`make test`

Auditors: emily
simple-markdown: don't let > escape from a paragraph

Summary:
Fixes a bug where inline `>`s would become a blockquote
even when they were in the middle of a paragraph

Test plan:
`make test`

Auditors: emily
simple-markdown: allow trailing whitespace after a code block

Summary:
fixes an incompatibility with marked.js where a trailing
indented line would prevent a code block from being
recognized as code (it would just become a paragraph).

Test plan:
`make test`

Auditors: emily
simple-markdown: don't allow defs inside paragraphs

Summary:
previously, using a [def]: like this inside a paragraph
would turn that part of the text into a def (thereby hiding it).
This should just be inline text in the paragraph since it's not
at the block level.

This change is a very, very hacky fix to that. The right
fix involves either parsing a group of defs at once, or
adding block vs inline parameters to the regexes in the
grammar, which we might have to do to comply with
"standard markdown" anyways.

Test plan:
`make test`

Auditors: emily
Future-proofing Perseus for coming JSX changes

Summary:
See http://fb.me/react-legacyfactory.

TODO: $_

Depends on D12798.

Test Plan: Open each widget and play with it a little. The only remaining JSX warnings are from <$_>, which I'll fix up separately.

Reviewers: aria, joel

Reviewed By: aria, joel

Subscribers: alex, jessie

Differential Revision: http://phabricator.khanacademy.org/D12796
Don't autofocus new expression widget

Test Plan: Loaded test.html with an expression widget, nothing blew up.

Reviewers: aria

Reviewed By: aria

Subscribers: jessie

Differential Revision: http://phabricator.khanacademy.org/D12870
New Matrix Widget

Summary: The matrix widget allows you to create an interactive matrix "board", where the student can create a matrix (or vector) up to the max size of the board. The user is warned when they enter an incomplete matrix that is the correct size (i.e. with blank cells). You can also specify an optional prefix or suffix for the matrix (e.g. M = [Matrix]). Fixes T3034.

Test Plan:
Create a matrix widget in perseus and try to break it!
Things to watch for:
- Does the matrix grade correct, incorrect, and incomplete as you would expect?
- Do the matrix braces always line up with your cursor and the matrix content?
- Does changing the max matrix size affect the inner matrix answer the way you would expect?

Reviewers: aria

Reviewed By: aria

Subscribers: alex, eater, cameron

Maniphest Tasks: T3034

Differential Revision: http://phabricator.khanacademy.org/D12726