message_cache: add function to get number of configured actions

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
thorium_actor: clear the flag for message cache when there are no actions

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>