A former FBI director is being investigated for a social media post interpreted by US officials as a threat against President Donald Trump.