use return values to indicate errors
proper type conversion

- use size_t for pointer difference in vocab_get_index function
- use signed integers for point
- use type casting where types change
- stop wasting memory by making binary in vocab_encode a bitfield