Ericsson swings to profit as savings kick in; shares jump