Don't get stuck in the loop.

If we get an exception from the iterator don't catch it and re-try, this makes our loop safer from getting stuck and never returning.
Switch to ConcurrentHashMap for licenses.

This means that we shouldn't get any problems with concurrent access to licenses.