Man charged with terrorism offences after alleged threat to kill police