Print a better error message in regression tests on an invalid handle.

Has no effect at the moment, but I've seen it happen during development
of new regression tests, when I've passed an invalid handle to print_diag
by accident.
Don't clear error number when SQLGetDiagRec is called.

Calls to SQLGetDiagRec are supposed to be nondestructive, per ODBC spec.
Also add a test case for that.
Fix typo in test case
Fix two UseDeclareFetch bugs.

1. NOTICE messages were not delivered to the application, if they arrived
as response to the DECLARE CURSOR statement.

2. Array-bound parameters on SELECT-queries caused a "cursor already open"
error.

These bugs were found by running the regression suite with
UseDeclareFetch=1. It's now clean.