python: Pull most of the logic in marshal.cc into python.
python: Pull most of the logic in marshal.cc into python.

Put most of the logic in python, and turn the c++ parts into a very
generic wrapper which could meaningfully run any python code under the
interpreter which will be embedded in gem5.

Change-Id: I3f6e50839490eaf0db9a6bd242efbcb8de1b6e24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49391
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Hoa Nguyen <a0aa8449aacb303edcb25d6bbe69da9124f010fc@ucdavis.edu>
Reviewed-by: Andreas Sandberg <c9f5686ee5bd561c93f9de79681eee75bfa7f36e@arm.com>
Maintainer: Andreas Sandberg <c9f5686ee5bd561c93f9de79681eee75bfa7f36e@arm.com>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5