The captain of a Flydubai aircraft has recounted fighting to open the cockpit door as an attempted terror attack unfolded on board.