Make API type-safer

Changes:
 - Restrict type of keys (including hash's) to `String`
 - Parameterize type of values
 - Rename `Format` to `Write`, `Parse` to `Read`

TODO:
 - Combine `Read` and `Write` into `Format`
 - Support various argument types for lua scripting