patch sql encoding bug in Queue Plugin

The failureMessage is not escaped for the DB when trying to write the failure message in markJobFailed. 
Is this a good idea? Probably not when using uuids for id's