Fix undefined variable usage & refactor/DRY code

Previously Net::IMAP#validate_data referenced undefined variable `num`

Introduces NumValidator helper module that contains
validators of 'number' and 'nz_number' data types (as per RFC 3501)