gameends event was not raised on every game end

Only a timeup triggered the gameends event. Now it is also raised
whenever a game ends due to any reason e.g. a normal draw or win.
go ending command was passed incorrect input

The go command was not being formed correctly. Instead of calling
the function getWhiteMillisRemaining and getBlackMillisRemaining
these functions were passed as is.