In all cases it means "goodbye" but carries connotations of goodwill and affection: it would be unlikely that anyone would use it when parting on bad terms. According to The Online Etymological Dictionary "to a fare thee well" meaning to perfection only dates from the late 19th century and only in the US. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.