Add purging of client result cache to parallel.Client

The new methods clear the cached values and free some memory.

The whole thing is split into different methods to both clear the
client and the hub side.

Additionally fix some bugs in other parts of the code.
Add Testcases for new purging methods in parallel.Client

Signed-off-by: Jan Schulz <jasc@gmx.net>
Optimise a check for empty jobs/target lists

If the inputs are empty, no msg_ids should be returned. So change the
test to not only check for None but also for empty lists.

Signed-off-by: Jan Schulz <jasc@gmx.net>
Merge pull request #2340 from JanSchulz/client-clear-cache

Initial Code to reduce parallel.Client caching

adds:

    client.purge_local_results
    client.purge_hub_results
    client.purge_results (does both above)
    client.purge_everything (includes history, etc.)