Kings agree to terms on new three-year contract for Dwight King