ChessPiece: harden piece ID-letter map functions
ChessPiece: harden piece ID-letter map functions

Use the PHP8 `match` function instead of `switch` to map between the
piece IDs and letters. This is more robust because it will throw an
exception if no case matches and ensures that we get the expected
return type.

Fixes a Scrutinizer warning:

> The variable `$letter` does not seem to be defined for all execution
> paths leading up to this point.

smrealms/smr,hemberger/smr,hemberger/smr,hemberger/smr,smrealms/smr,hemberger/smr,smrealms/smr