Ukraine rivals sign deal to end crisis