A former police community support officer who was "obsessed with weapons" has been jailed after trying to make a gun using a 3D printer.