Maharam algebras