msgbuf: Define a separate msgbuf structure for encode/decode function

Define separate msgbuf structures to avoid casting away const-qualifiers
in the msgbuf constructor function:

* pldm_msgbuf_rw: for encode functions with non const-qualified buffer
* pldm_msgbuf_ro: for decode functions with const-qualified buffer

Further, use _Generic() to keep the API ergonomic while still yielding a
compile error when wrong msgbuf type is passed.

Change-Id: I71dbcb7996e9fb402b49870fce539a939c1497e5
Signed-off-by: John Chung <john.chung@arm.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/meson.build b/tests/meson.build
index 0c3bc2b..7ded005 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -12,7 +12,10 @@
     gmock_dep = gtest_proj.dependency('gmock')
 endif
 
-test_include_dirs = [libpldm_include_dir, include_directories('../src')]
+test_include_dirs = [
+    libpldm_include_dir,
+    include_directories('../src', '../tests'),
+]
 
 tests = ['instance-id', 'msgbuf', 'responder', 'utils']