Move file scanning out of Pool file scanning

Index recovery will need this functionality to be separate.
Remove test directories when finished
Warn about old-style casts

This don't check as much, and can allow pointer bugs to slip in.  They
are also hard to search for, since the syntax is unobvious.