WL-3606 : various changes

rethrowing sql exception
putting connection release back in finally block
moving DB_ERROR constant
making resourceloader static
making debug level 'debug'