GPL License Applied
Now seekNearestHistory method uses template

This lets implementations of this library use the result of this method
without casting