A Pennsylvania man who posted 'Trump needs to die' and boasted of stockpiling guns has been jailed for four years after pleading guilty to threatening to assassinate President.