How the psychology behind store loyalty schemed paved the way for the tools which keep us all motivated to work out, eat better and smash our goals.