trainer: fixed bug in sgd for small number of batches
trainer: fixed bug in sgd for small number of batches

joprice/factorie,pogren-oracle/factorie,patverga/factorie,Craigacp/factorie,digitalreasoning/factorie-scala-210,hlin117/factorie,factorie/factorie,zxsted/factorie,strubell/factorie,melisabok/factorie,asubbaswamy/factorie,malcolmgreaves/factorie