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.
I think we should catch `TransactionFailureException` in allow retry in that situation, and separately catch `InterruptedException` and propagate that exception.