Added validation checks to edit-workflow endpoint.

The edit-workflow endpoint will now verify the workflow is not public and that the current user owns it.
Fixed the check for empty results in get-analyses.
Updated thrown exceptions to maps with error codes via throw+.