add type validation to the testium api

If someone tries to use one of the testium api methods with improper params, they will often see confusing error messages. This PR adds type checking to just about every parameter in the API. It also adds unit tests to ensure those type checks work properly.

I'll probably squash this premerge, but leaving the commits in for now in case that makes it easier for you to review.