refactor implementation of planning strategy

Separate planning strategy and planning task into distinct classes.
Extract GraphFactory and GraphExtender into interfaces.