Failing test-case for sandbox add-source regression.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-Wall police.
Check that sandbox exists before running 'sandbox delete'.
Only call 'listBuildTreeRefs' when actually needed.
It's safe to add ignored add-source deps to the timestamp file.

And should be faster.
Print the "Cache updated" message from a single place.
Force-update the cache in 'add-source'/'remove-source'.

Fixes #2060.