Gravity coupled to a scalar field from a Chern-Simons action: describing rotating hairy black holes and solitons with gauge fields