Cartesian currents and variational problems for mappings into spheres