EE-port of: Atomic generation of internal ids for issues.
I've picked changes from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17580 and fixed all conflicts. In addition to that, EE-specific models have been changed to use the renamed NonatomicInternalId
module instead of InternalId
.
Edited by Andreas Brandl