Off-duty pilot accused of trying to shut off airliner’s engines mid-flight said he took ‘magic mushrooms’ 48 hours before the incident, court documents say