Remove use of `indexOf()` when adding locale data

`Array.prototype.indexOf()` is an ES5 method we were using when it wasn't necessary. This remove its usage, and improves the error handling when adding locale data and resolve locales.

Fixes #76
This library contains a "polyfill" for `Object.create()`.