remove some duplicate code

The validate_to_zulu and validate_chat functions were similar enough that Codeclimate indicated they were duplicate code. This commit combines them in to one function (validate_bool_opt) and updates the unit tests to reflect the changes.
reduce complexity of guid generation

Chunk out the bits of data for the guid generation to further reduce the complexity of the individual functions
Merge pull request #13 from theckman/codeclimate_fixes

Codeclimate fixes