Add MaxMind record class

Refactor test code to share tests in a library