use closure to generate uuid. fix #399
Merge pull request #401 from doctrine/uuid-closure

use closure to generate uuid. fix #399