Implement fetch last commit for paths RPC
While trying to come up with a better solution for CI caching key, it was proposed to use the last commit that changed some given files( gitlab#18986 (comment 216161166)) but this requires a call to last_commit_for_path for each path to find out the latest commit.
We need a way to get this commit in one call, something similar to last_commit_for_path
but with an array of paths.