Make UploadPack a gen_fsm

This should fit it much better than gen_server. The negotiation code
doesn't work at all yet, but ref advertisement still does.