Quark and pion condensation in a chromomagnetic background field