1. Implement header packing in pmix_io to be achitecture-agnostic.
2. Perform some refactoring to improve code readability

hellompi test works.