Use atomic instead of mutex to increment one integer

Another attempt to use atomic instead of mutex.
Seems like go lack `getAndIncrement` so this patch changes behaviour - now framework ids start with `1` instead of `0`.