Put npm-debug.log file in the cache folder, not cwd

This should prevent mishaps like #1548, while avoiding overly
configurable options that make it hard to predict where the file
will show up.

Fix #1584
Close #5252

update test for new behavior

smikes:
 * strawman version of multiple logs
 * add unit tests for prune, findlogs