use tomlkit for stripping dependencies for "foreign" targets
This removes the custom regex-based and possibly error-prone parsing
of Cargo.toml files and replaces it with logic based on an actual,
style-preserving TOML library (tomlkit).
Additionally, only removes *optional* dependencies from feature
dependencies.