Police have commended passengers on a domestic flight in Australia who overpowered a 17-year-old boy armed with a shotgun as he tried to board the plane.