Ensure LegacyIdInterpreter can accept numeric id as string

For backwards compatibility, LegacyIdInterpreter also accepts
$numericId as a string.

Also added tests for LegacyIdInterpreter, which apparently
never had tests.