Corrected prunesocketset and pruneprocessset

fd sets passed to select() were pruning ready FDs rather than pruning
UN-ready FDs.
Added ret != 0 back
Merge pull request #822 from onionhammer/devel

Corrected prunesocketset and pruneprocessset