Make getLabels return an eager iterator to avoid comodification exception
GraphDatabaseService.index now asserts transaction

 * I guess it technically does not have to, but there was a TODO about it.
 * A test failed when I made the change, so that has been fixed.
 * I mostly did this because I was waiting for other stuff to compile,
   so it can safely be ignored if we don't actually want to do this.