Minn. lawmakers aim to avoid foreclosures for those on brink