Refactoring engine to build and call task policies

* Fixed engine to build and call policies
* Fixed policy interface
* Added stubs for wait-before, wait-after and retry policies
* Added factory methods to build policy instances from specification
* Unit tests

Change-Id: I96ad4a80e3f205a81efe2076da4a5db849fc6b75