Ill. judge charged with heroin, gun possession pleads guilty