[#617] Install from source doc updates
Merge branch 'master' into 617-source-install-doc
[#617] Build solr index with -r
Pass current user
Add a test
[#708] Fix render_markdown() helper function
[#708] Switch over to use markdown_extract() not misc.py
[#708] Fix tests
[#708] Get markdown_extract() to use RE_MD_HTML_TAGS
[#708] Minor refactor
[#728] Add ckan.tracking_enabled to app_globals

The ckan.tracking_enabled ini file setting was being ignored, so page
view tracking wasn't working. Adding ckan.tracking_enabled to
app_globals makes the setting work again.

Fixes #728
[#729] Handle languages in URLs when updating page view tracking summary

Page view tracking was failing when a language was selected:

1. Put `ckan.tracking_enabled = true` in your ini file
2. Run CKAN, visit a page with a language e.g. `/en/dataset/annakarenina`
3. Run `paster tracking update`. If you look in your db, in the
   `tracking_summary` table there'll be a row with `package_id`
   `~~not~found~~`.
4. Run `paster tracking export tracking.csv`, the exported CSV file will
   say 0 views.

If you visit the page without the language in the URL e.g.
`/dataset/annakarenina` then run the export command again, the view does
get counted.

This commit fixes the SQL used by the `paster tracking update/export`
command to handle URLs with or without languages at the start.

Fixes #729
[#541] Add docs for page view tracking feature

Add documentation for the page view tracking feature. There are still
some details to document, including how to show number of page views on
the pages themselves (eg. dataset views next to datasets) and how to
show "popular" labels next to popular datasets. It's also possible to
get a list of the N most popular datasets, for example for the front
page, perhaps this should be documented too.
[#541] Add popularity-sorting screenshot

Should have been added in commit 3eeeef2 but I forgot.
[#256] Remove id from dashboard activity list.

* Remove id from the dashboard activity list functions
* If offset is less than 30, show less should link to offset 0.
Merge branch 'master' into 256-dashboard_activity_list_error
[#730] Only show 'Popular' sort option if tracking enabled

Sorting datasets by popularity only works if page view tracking is
enabled, so don't show the 'Popular' option in the 'Order by:' dropdown
if tracking isn't enabled.
[#702] Update Recline to latest master version.

Adds filter support for datastore backend and a
couple of other bug fixes.
[#714] Fix default sort ordering

Change the default sort order of package_search() to 'relevance asc,
metadata_modified desc'. We want to sort by relevance by default, but
when there's no search query relevance is meaningless, in that case fall
back on showing the most recently modified datasets first. Also changes
the sort ordering of the "Relevance" option in the "Order by:" dropdown
to 'relevance asc, metadata_modified desc' instead of just 'relevance
asc'.

The previous default ordering was 'score desc, name asc'. I'm not even
sure if that works, it seems to disagree with the sort strings that the
dropdown gives you, when you chose relevance from the dropdown you got
'relevance asc' not 'score desc' (and the datasets appeared in a
different order then the default), and when you chose name you get
'title_string' not name.

Previously we've fallen back on showing datasets alphabetically but
that's boring as it simply means that all the datasets beginning with 'a'
are always shown. Last modified seems more interesting and changes over
time. Popularity is not an option because that only works if the page
view tracking feature is enabled.

Move the logic that selects the default sort order for package_search()
out of lib and into package_search().

The package_search() action function now returns the sort order it used
in the 'sort' key of the returned dict, and the package controller sends
this to the templates to decide which sort ordering to show selected in
the "Order by:" dropdown. Previously the package controller and action
function each had their own logic and the dropdown was out of sync with
the actual sort order.

Fixes #714.
[#541] Add docs for highlighting popular datasets and resources

Also mention that tracking summary data is also available for resources
via the API, not just packages.