  In this paper we continue to develop the m-mode formalism, a technique for
efficient and optimal analysis of wide-field transit radio telescopes, targeted
at 21 cm cosmology. We extend this formalism to give an accurate treatment of
the polarised sky, fully accounting for the effects of polarisation leakage and
cross-polarisation. We use the geometry of the measured set of visibilities to
project down to pure temperature modes on the sky, serving as a significant
compression, and an effective first filter of polarised contaminants. We use
the m-mode formalism with the Karhunen-Loeve transform to give a highly
efficient method for foreground cleaning, and demonstrate its success in
cleaning realistic polarised skies observed with an instrument suffering from
substantial off axis polarisation leakage. We develop an optimal quadratic
estimator in the m-mode formalism, which can be efficiently calculated using a
Monte-Carlo technique. This is used to assess the implications of foreground
removal for power spectrum constraints where we find that our method can clean
foregrounds well below the foreground wedge, rendering only scales $k_\parallel
< 0.02 h \,\mathrm{Mpc}^{-1}$ inaccessible. As this approach assumes perfect
knowledge of the telescope, we perform a conservative test of how essential
this is by simulating and analysing datasets with deviations about our assumed
telescope. Assuming no other techniques to mitigate bias are applied, we
recover unbiased power spectra when the per-feed beam width to be measured to
0.1%, and amplifier gains to be known to 1% within each minute. Finally, as an
example application, we extend our forecasts to a wideband 400-800 MHz
cosmological observation and consider the implications for probing dark energy,
finding a medium-sized cylinder telescope improves the DETF Figure of Merit by
around 70% over Planck and Stage II experiments alone.
