A Sri Lankan Airlines pilot has been suspended after locking his female co-pilot out of the cockpit during a 10-hour flight.