Three-dimensional hydrodynamical simulations of stellar collisions. I - Equal-mass main-sequence stars