Hearts are on the verge of coming out of administration after creditors approved the sale of shares in the club.