Hardening of number generators and tests.

Hardening for generate_integer method and tests. Still need to harden
positive and negative integer generation methods.