Refactor and improve error hinting.
Instead of using complicated match statements, use downcasting to find error types that define specific hints. This also lets us define a reasonable hint-extractor for anyhow::Error, and use it when reporting errors in main.
I've left an implementation of hint() in impl Error
, to
avoid breaking backward compatibility.
Closes #1165 (closed).