Stadsgården, Masthamnen och Hammarbyhamnen