Ignore remote orgs in CKAN harvester

If #17 progresses we can do somethign similar for them, although it amy
be more complicated because of authorization issues.
[#34] Fix harvest_source_clear action

Some typos in the SQL statements, and also the source needs to be
reindexed to update the status with the counts.
[#34] Expose harvest source clear button
[#34] Allow all authorized users for a source to clear it
[#34] Fix typo in warning message
Add hover helper text to refresh and clear buttons
[#34] Integrate clear command with delete source

When deleting a source, if clear_source equals true in the context,
harvest_source_clear will be called. Default is false. The UI shows a
select with the two options.
Fix bug in source datasets migration

Wrong dataset type was causing the default package schema to be used,
thus failing when providing an id.
Better harvest source dataset migration

Current implementation only checked for the first source to exist and
didn't allow to rerun the migration for other sources if there was an
error. With the new one, all non existing sources are migrated each
time.
[#17] Import remote groups in CKAN harvester

This is a cleaner commit of the great work done by @platzhirsch
implementing remote groups import on the CKAN harvester.
[#17] Remove ckanclient dependency as it is not used
[#30] Remove lxml dependency
[#17] Fix bug with remote groups handling

If neither 'only_local' or 'create' are used the remote groups property
needs to be removed, otherwise it causes an exception when the group is
not found.
Change type of the API version to integer

The CKAN logic uses integers when dealing with the API version, e.g.
making checks which API version is in use. Currently, the harvester
uses strings to identify the API version. Instead of dealing with
type conversion the harvester could use integers directly.

This commit fixes okfn/ckanext-harvest#36. When the API version is
parsed from the configuration it is passed through the int() function.
This way the harvesting will still work even if a harvest source was
configured with a string API version which makes this commit backward
compatible.

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>
Add exception handling for the API version parsing

I have added try-except clauses in order to prevent the process from
crashing if a non-parsable integer is used for the api_version option.

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>
Fix api_version check in the group importer code

I have forgotten to update one check for the api_version 1 in the code
responsible for the remote group import feature. This commit fixes that.

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>
[#36] Move validation code to validate_config

This ensures it is checked whenever the source is edited or created.
[#42] Dump non-string extras with json

Convert any non-string extra values to strings using json.dumps(),
instead of just deleting them.

Conflicts:

	ckanext/harvest/harvesters/ckanharvester.py
use correct limit for paging harvest listing
fix so that non sysadmins can edit harvest sources of organizations they
are admins or editors of.