Added gradle wrapper
Added tests for ChainIterator - behaviour is incorrect if calls to hasNext are omitted