Switch to using os.environ instead of os.putenv()

The os.putenv() call doesn't update os.environ and Python documentation
recommends using os.environ.
Functionality for clearing the nscd cache in pynslcd
Parse the nscd_invalidate option
Start the nscd invalidator process if needed
Detect and handle connection failure and recovery

Logs a connection recovery message and run a nscd cache invalidation if
configured.
Implement clearing of nscd cache in pynslcd