'Vigilante' Hamilton cop sentenced to 5 years in gun-planting case