[#576] Fix the non-working ostool grantadmin cmd
Merge branch 'master' into 576-ostool-admin
A bug in lxml causes it to lose the doctype (even though it's parsed correctly). We therefore have to add it manually.
Merge pull request #593 from openspending/576-ostool-admin

Fix up ostool option to grant admin (Fixes #576)
Merge remote-tracking branch 'origin/master' into 588-incorrect-height-of-text-input-fields
Create the undefined functions for the cookie check
Merge branch 'master' into remove-catapult-references
Change the statement from genshi to jinja2
Merge pull request #595 from openspending/remove-catapult-references

Remove catapult references
Merge pull request #596 from openspending/content-jinja

Change the statement from genshi to jinja2
Added functions to source to check whether the source has been successfully imported into the database. This in turn required a distinction between different kinds of runs so the database now logs in the operation field whether it's a sample run or an import (added configurable variables in run.py)
Added a delete functionality for source (does nothing but redirect). The delete function doesn't use http's DELETE put a post for browser compatibility.

Modified the operations in the editor so that user's cannot load a sucessfully loaded dataset (gives a success messages). If it hasn't been successfully loaded, but is loadable the user can press the normal sample or load buttons, if it's not loadable the user can delete ther source.

Note that this does not allow the user to delete a loadable dataset.

Modified the loadable property so that it also checks if the source has already been successfully loaded.
Better flow of buttons. Now users need to sample before they can load. Delete source is available at all stages except after loading.
Added icons to sample and load (make the buttons smaller) and moved "Delete source" into title attribute (to make delete button smaller)
Renamed Sample button to Test and added Delete text to Delete button
Changed sample to a dry run (so data isn't loaded when testing the source).
Check for unique constraint when doing a dry run since we don't touch the database
Show operation buttons for all sources, not the first one.
Mark all runs for all sources where loaded data is deleted as 'removed'. Give it a nice status label in the list (default color).
Implement delete functionality