Measurement of the direct emission and interference terms and search for CP violation in the decay K-+/- -> pi(+/-)pi(0)gamma