A machine-learning-based method of detecting and picking the first P-wave arrivals of acoustic emission events in laboratory experiments