When 2 projects happened to be created in the same time, new projects won't be created.

I run into a situation today. I couldn't create new projects in redmine. 

After looking into the code, I found that it is a bug in Project.next_identifier. 
When 2 projects happened to be created in the same time, the Project.next_identifier would generate duplicate identifier, which in turn would fail the new project creation.

Btw, I like redmine very much. Thank you guys for your effort to make it so wonderful!