Improvement: getLastTick should return history tick when no tick was
provided before. In case of invalid history tick an empty tick will be
saved. This makes the use of the price engine more convenient and
consistent.
Added UTs to assure that history is not used when tick was consumed.
The loop task now waits for the future to finish. This more performant
approach needs to be live tested.