removed compile-time dep on a valid $dbh from C4::Dates
This replaces using the package variable $prefformat directly, and
specifically, doing a call to C4::Context->preference() during
module initialization. That way, C4::Dates no longer has a
compile-time dependency on having a valid $dbh.
The inspiration for this is making it easier for
zebraqueue_daemon to have code that detects when
the database connection goes down and then try to
reconnect to the DB.