StarSmasher: Smoothed Particle Hydrodynamics code for smashing stars and planets