Throw exception instead of returning null on request errors

Returning null will result in NPEs in callers, hiding the real cause of the original error.
Delete existing media db on upgrade to 2.3
add class=latex to latex img tags

https://github.com/dae/anki/commit/d46bbabae7f6d4279c776fe96acc31caa5c6c1ff
Merge pull request #505 from hssm/maintenance

Small changes before beta