Refactor submit logic into gerrit-server

This change moves logic that was duplicated over the ssh command and the rpc
handler into a Submit class in gerrit-server.

Change-Id: I70cf5aa04d091e5652d8bc3e5a254339a80bd6fd
6 files changed