Enhancements related to API workflow sharing.

Add ability to specify 'publish' and 'importable' when uploading new workflows via the API. Implement tests of this ability and use it to test importing shared workflows (recently added by Nicola). Small improvements to shared import exception handling.
Rework workflows API to use new decorator.

Use more helper methods to reduce method length, duplication. Improved testing, exception handling.