Use data provided by remote CMD only when appropriate

Before this change, if a file was requested from a remote
API repo with CommonsMetadata installed, the local CMD did
not run and returned the remote CMD data as-is. This is
problematic if the remote installation has an older (or newer!)
version of CMD, and especially annoying for testing.

The reason for this behavior was that certain data (specifically,
categories) is not available when using a remote API repo. So now
we take over all data if the remote CMD has the same version,
but only categories otherwise.

Change-Id: I128014c0dbb1b6412abb8bb27735cbd80028a8ad