Magnetic properties, structure and shape-memory transitions in Ni-Mn-Ga thin films grown by ion-beam sputtering