Initial implementation of new data metadata editor

This doesn't handle switching between columns without losing your edits yet
(browser will warn about unsubmitted form content).

Doesn't handle validation errors yet.

Add resource_edit() method to DataPackagerPackageController, this replaces
CKAN's core package controller's resource_edit with our own. It handles
receiving the new data metadata fields, processing and saving them. Calls on
the core resource_edit() to save the old resource fields.

Some links in templates had to be edited to make them call our new controller
method instead of the core one.

The <form> tag itself had to be modified to submit to our custom controller.
On creating a new resource (instead of editing an existing one) it still
submits to the core controller.

datapackager_csv.html snippet now includes a for_edit option that if given
makes it show form fields in the metadata section instead of the normal
description list. New CSS was added to make this look good.

Remove the sidebar and some other unwanted stuff from the resource edit form
page.
Add some tests for the new metadata editor
Remove the old metadata editor code

The (in-progress) new edit functionality replaces it.
Hide index in metadata editor
Change type to a dropdown

Haven't got Select2 working yet though
Implement changing between columns in the resource editor

If the user clicks on a column in the CSV preview on the resource edit page,
the page reloads with that column selected and any values entered into form
fields on previously selected columns are maintained.

Lots of logic added to the custom package controller to handle this.

schema_fields is now passed from the controller to the datapackager_csv.html
snippet, and used to fill the values of the form fields. schema_fields is
either the resource schema values from the database, or those previously
submitted by the user during this editing "session".

Renamed selected_row in the templates and controller to selected_column.

Update some tests.
Resource editor CSS tweaks
Another CSS tweak
Another CSS tweak
Implement validation error handling in the resource schema editor

Every time the resource edit form is submitted - regardless of whether
submitted by clicking Save or just by clicking to go to another column of the
CSV - the resource schema field data entered into the form is validated. Any
errors found are sent to the template as schema_errors, and rendered next to
their form fields.

The first column with errors is always shown as the selected column, unless
there are no columns with errors, then we show the column that the user
clicked on. So as long as there are validation errors with the current column,
the user is not allowed to move to another column.

*Lots* of complicated new logic in the controller.

Some refactoring of the controller to move things into small helper functions
and remove duplication.

Some CSS tweaks to make errors look good on the form.

Added validate_only param to resource_schema_field_update() so that it can
be used to only validate the data. _create() will need the same param.
Merge branch 'master' of github.com:ckan/ckanext-b2 into metadata-editor

Conflicts:
	ckanext/datapackager/fanstatic/datapackager.css
	ckanext/datapackager/templates/datapackager_ckan_theme/package/resource_read.html
Remove schema overwriting warning

Can't get it positioned properly, put it back later
Implement adding new attributes to resource schema fields

Adds a new "Add a new attribute to this column:" section to the resource edit
form with key and value <input>s and a (+) button. When the (+) button is
clicked, the entered key and value are added to the schema field, the page is
reloaded with the new key and value added and the "Add a new attribute"
<input>s empty again ready to add another new attribute.

If you enter text into the inputs and then click to go to another column
(without clicking the (+) button first), you can go back to the column that
you were on and find your text still entered into the inputs.

As with editing existing attributes, new attributes aren't actually saved to
the db until the Save button is clicked.

If you add a new attribute with the same key as an existing one, it simply
overwrites the existign attribute, no warning is given.

If you try to add a new attribute with an empty key, it won't be added and
the page will just reload with any text you entered into the Value <input>
still there, again there's no warning.

If you enter text into the new attribute inputs and then click Save without
clicking (+) first, the new attribute is *not* saved.

If you hit Enter in one of the inputs instead of clicking the (+) button,
it doesn't work.
Implement deleting attributes from schema fields
Show correct column names in CSV preview

Use the column names from the schema, not the ones from the CSV file.
Merge branch 'metadata-editor'