index: Allow indexing a document with a 0 ID
delete: Don't allow deleting without an ID
Ignore '' path segments, which is important for get_mapping et al.

Factor out _join_path to make testing easier.
Merge support for 0-ID documents. Closes #80.