Report deadlocks as separate error stats.
Move error constants into mysql package.