api: add new parameter to allow users to request email notifications
The new API parameter allow users to request email notifications for their jobs.
For now it can take the following values:
- onfailure --- only receive email notifications when a job fails
- onfinish --- receive email notifications whenever a job finish
- all --- receive all job notifications, finish, startup, etc
- none --- the default, don't receive any email notifications
Signed-off-by: Arturo Borrero Gonzalez <firstname.lastname@example.org>