Performance tweaks

Adds markdown caching and fixes an n+1 in the user index page. Also fixes post ordering.