mysql: Run less of the code in a try block
mysql: Prevent deadlocks from leaving a serializable session open

Doing a select could cause MySQL to lock when we don't need it to.
Add categories

First step, add ability to add categories and job in them with a single request.
web: Error if names are duplicated
web: Remove jobs no longer defined in category