The O(n) model on a random surface: critical points and large-order behaviour