Changed last search query tracking to server-side

Recent changes to last search query handling still haven't fixed all
possible routes, so I've simplified the whole thing at expense of clean
URLs.
Added exit status codes to test runner
Fixed problems with persistent search parser cache
Added permalink field to post view
Done some code cleanup
Added flash size constraining
Reorganized code to reduce comments