JS: new InstanceIterable class to replace instancesOf()

Signed-off-by: Jennifer Chui <jennifer.chui@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: small change to update logic in Entity iterable helper

Keep the nextPos index capped at the size of the allEntity list.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: update version to 2014-05

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>