Improve mri.c code coverage

Added unit tests to mriTests.cpp to get the code coverage for mri.c up
to 83.82%.  I will revisit the remaining uncovered lines after writing
unit tests for the other modules in the MRI core code base since they
should force paths to be covered in mri.c as well.

I also added more instrumentation to the platformMock to enable better
mri.c unit testing.
Create gdb_console module unit tests

Code coverage for gdb_console is now at 100%.

I also added a platformMock_SetCommSharingWithApplication() API to
platformMock which allowed the gdb_console unit tests to verify
functionality when sharing the COM port and when using it exclusively.