Upgrade Joi to 2.x

Updated dependency Joi to 2.9.0.

Updated tests to use new type syntax introduced in Joi 2 (https://github.com/spumko/joi#migration-notes)