Include an SQL state when throwing an SQLException during checkClosed

This patch includes an SQL error code, that provides a better indicator to
consumers to retry. Otherwise, the exception is too bland and matching on
the string is not the best kind of API.

More details here: http://jolbox.com/forum/viewtopic.php?f=3&t=582

Signed-off-by: Ken Barber <ken@bob.sh>