Add ability to configure id properties in code

Closes #407
Merge pull request #1145 from elasticsearch/feature/idproperty-in-code

Add ability to configure id properties in code