It is a very interesting question indeed.
The answer by shabunc is also very good. For example, I did not know that "Пока" was introduced at Korney Chukovsky's time - the beginning of the 20th century. I thought it always existed :-). And I did not know also about his attitude to the introduction of this word then.
I remember when "давай" instead of "до свидания" or "пока" was introduced. It was at the end of 1970s - beginning of 80s. I remember how I myself started to use it. My understanding of its meaning was bullet number 4 in shabunc's list, i.e. motivational.
The problem with more formal expressions of goodbye like "прощай" (almost never used), "до свидания", "счастливо", and even "пока" is that they have too much pathos for certain situations. When you part with a good friend casually, you do not want to show too much senses but at the same time you want to finish your conversation on a positive note. Something like wishing him/her good luck but without too much pathos. Here "давай" comes into play with a hand wave for example. Давай goes (to my mind, at least that is what I was thinking when I was using it) as shortening of "давай, будь здоров", "давай, наслаждайся жизнью", "давай, делай что задумал", or if I may mix Russian and English "давай, continue with your life".
The fact is that давай in motivational meaning (used as a soft motivation in Russian) conveys some positive attitude to the person who it is addressed to. Something like "I believe you can do it."
When I used/use it personally I do not think about "давай прощаться", "давай руку", "давай пять" or "давай-давай". But it is just me. :-)
до свидания. But consider it as informal and probably sometimes at the edge of rudeness.