How companies can optimise airline miles and other loyalty programmes for maximum profit and customer engagement.