deep_replace

utility function for replacing object properties at an arbitrary depth,
to be used in conjunction with the VIS prefs.
deep_replace VIS prefs on load
two vis TODOs
use strict for jslint fulfillment
de-linting and commenting model
use jslint for linting
de-linting
one extra todo
first working version
Make the clickable topic bars a bigger target

the target is the whole height of the plot even if the bar is small.
Unfortunately the individual years are still quite narrow.
interface tweaking on the barplot

thinner bars (and centered on years rather than anchored at the left
cover), but wider hover targets; color for a selected bar

and the clear-year button
fixed-width column in topic_docs table
revise model.valid_year

now we take the easy way and just ask for the topic time series and
check whether it has an entry for the given year. This takes advantage
of the cacheing. Shouldn't be too painful on performance, since normally
we're only validating years when we're about to display the time series
anyway.
/topic/year URLs

topic_view now takes a year parameter, which is validated by
model.valid_year before being passed on to topic_docs.

this requires some additional global state if we don't want to redraw
the whole topic_view when the user clicks a bar in the barplot:
VIS.view_updating. This flag is reset after a view_refresh, but if set,
topic_view will skip drawing the topic words and the topic barplot.

Moved the clear-year button to near the topic plot rather than the topic
docs table; added help text.

Tooltip tweaks in next commit...
tooltip revisions

tooltip is now a div added by the javascript to the body (so that it
doesn't get squashed up the edge of the topic_plot container).

show just the year; changed tooltip.text() to expect the data element
instead of just the year--but decided against including the percentage
in the tooltip text after all.

also, some tooltip restyling.
freeze jquery
model.years()

returns a list of years included in doc metadata.

requires a rewrite of yearly_totals() so that it will return the full
map object if no year specified
model.year_topics()

return a list of topics sorted by their proportions in a given year.
fill in missing tr under thead elements
shorten model view help text