Fix compile in C++20 mode.

* std::result_of is deprecated; switch to std::invoke_result
* Add use of std::string_view::(starts,ends)_with as appropriate
  (see https://issuetracker.google.com/issues/253467211 )

Test: Compiles with -std=c++20
Signed-off-by: Peter Kasting <pkasting@chromium.org>
Change-Id: I8b6bf79b3fb663e2151145cc1eec260fd3e2e2b4
2 files changed