Implement a callback when flowlet number of instances change

Fix for https://issues.cask.co/browse/CDAP-516.
Bamboo build: https://builds.cask.co/browse/CDAP-DUT156.
This would require documentation changes.
you should retry only on failure right ? it seems like you retry even on success ?