Add global and per-peer queue limits
Fix EmergeThread hang on exit
Add emerge queue limit configuration