Man jailed for making threats to kill former partner with machete