Make raw2trace more isolated
Created by: s-kanev
Right now, it aborts on error and uses global options. Fix that.
Also, it does a lot of directory walking and raw IO, which doesn't work with more exotic filesystems, where we can be storing very large traces. Split out a self-contained library, which:
- only takes already opened std::istream and std::ostream-compatible files and doesn't own them;
- takes in the contents of the module file to avoid doing IO from drmodtrack_offline_read();
- returns errors on failure;
- doesn't depend on dr_frontend.
Also, add a frontend helper, which preserves the current behavior for local use on regular POSIX and Windows.