For PERL_CORE, don't undefine HAS_QUAD when building with 32 bit IVs.

When commit de1c2614758a00c0 added support for $Config{d_quad} and HAS_QUAD
in Oct 1999, it also undefined HAS_QUAD. It's been that way ever since.

This isn't actually correct on a platform with a 64 bit type available, but
changing it now will cause too much breakage on CPAN for too little gain
(See RT #119753). However, we do need HAS_QUAD in the core for use by the
drand48 code, so make the undef conditional on PERL_CORE not being set.
Use U64_CONST() for the drand48 constants that are larger than 2**32.

Without this the constants are truncated to 32 bits on (at least) HP-UX
with 32 bit IVs, which results in some very wrong output from rand().
Update the comment in util.h related to HAS_QUAD and U64TYPE.
Merge the cast fixes that enable drand48 to work on 32-bit HP-UX builds.