Generalized reaction and unrestricted variational formulation of cavity resonators. II. Nonorthogonal and free-boundary mode-matching method