Substrate dependent intramolecular palladium-catalysed cyclisation and subsequent β-H elimination or C–H activation: a general method for the synthesis of fused pyran rings