Spectral asymptotics for canonical systems