Computing finite and infinite free resolutions with Pommaret-like bases