fix bug in APICursor - hasNext() sometimes returns true when there are no more entities
update comments to reflect latest API definitions