Added a flush mechanism to actor thread. This is used to wait for all waiting jobs in the queue to be completed.
Add actor library which implements the Actor model (see https://en.wikipedia.org/wiki/Actor_model).