Britain's King Charles hands over military role to son William