VM: GC_BIGNUM must be called in the same scope as the variable declaration
db.postgresql.lib: if PQsetdbLogin fails, PQfinish must be called
imap.tests: created connections needs to be disposed
Revert "calendar.format: change to use formatting instead of math.parser.private."

This reverts commit 3cfac7916a4d3708f231875ade0cd5e586ec43e6.