Multiple scattering by non-muffin-tin potentials: general formulation