Profiling and improving left_nav generation

* Small refactorings to leftnav(), get_full_contentsection_list() and
  lef_nav.html to try to reduce the number of SELECTs. Current runnig
  count 1200->810.
Fixes many left nav problems:

Mainly, puts context back so that it will hightlight where the student
is and also refactors and cleans up the code a lot.  Maintains the
ajax-loading and caching. closes #1746 and closes #1843

Also closes #1584 by putting them back in for exams / surveys / quiz
Merge pull request #1900 from Stanford-Online/jbau-jrbl-refactoring_left_nav

Jbau jrbl refactoring left nav