(#15791) isolate deterministic random function

We should not fiddle with the global seed, as other people
might still depend on Kernel.rand() not being that deterministic
as it is the idea with the fqdn_rand function.

However, as ruby < 1.9.2 does not provide such a nice solution, as
a dedicated Random class we simply call Kernel.srand() again on ruby
< 1.9.2 -> Reinitialize with a less deterministic seed.
Remove some duplicate code, simplify

The this_csr_is_for_the_current_host method appeared twice (apparently a
merge error), and produced more confusion than was removed by factoring
it out of the generate_certificate_request method, since "this" in this
case is a host, not a CSR.
Use the `message` method to get exception info

Withot this, the error is "Could not request certificate: system lib",
which is not very helpful.
Merge pull request #1563 from djmitche/log-exception-message

Use the `message` method to get exception info
Merge pull request #1558 from djmitche/dupcode

Remove some duplicate code, simplify
Merge pull request #1539 from duritong/fix/master/15791_do_not_fiddle_with_global_seed

(#15791) isolate deterministic random function