A quick introduction to Deferreds / Promises in JavaScript through jQuery's implementation