[comm-services-lib] Fix doctests
Summary:
We have some examples in services lib (which is great!) but when running cargo test in comm-services-lib they all fail. This diff improves the examples so they can also be run alongside tests.
Here is some more info about documentation tests: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html
We can use /// # syntax to include utility code that allows the example to be run, but won't be visible when generating the docs/ hovering over the definition in IDE.
This all adds some verbosity, so if it's decided that it's not the best option we should at least add ignore so the examples aren't run/compiled when running cargo test
Test Plan: cargo test --all-features
Reviewers: bartek, patryk, jon
Reviewed By: bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8889