Fix bulk insert code example 

Previous code example did not flush all entities when entity count was not a multiple of batch count.
Merge pull request #1094 from thekeyboardbum/master

Fix bulk insert code example