A Portsmouth letting agency has been sentenced for harassing tenants in overcrowded, unlicensed houses in multiple occupation (HMOs).