Sending pull request for a fix [for NoSuchElementException], couple of new features[additional segment granularities]

1) A Fix for NoSuchElementException
=> Added a minor fix for NoSuchElementException

2) Added a new feature so that segments can be created with other than default-druid-provided granularities.
=> Here may be we should think of something which will make this logic generic because now I had to write a separate enum for each granularity so instead of writing new enum just core logic should change at some place etc.