Make sure views compiled from JS get rebuilt if the map/reduce fn changes

…Although currently this only takes effect next time the app is launched, i.e.
it isn't watching for edits of the design docs while running.

Also moved the code that triggers the compilation out of TDRouter and into
TD_View and TD_Database.