Index and unique support

This adds single and compound index/unique support as per #18. Documentation updated with the new features too.