More core tests and restructuring.
- Split out SHM and surface tests to separate files under tests/core.
- Add a few more SHM and surface tests.
- Make
expect_failure_code
a bit easier to use. I have removed the custom message for now, since in most cases it was just a rehashing of "didn't get X error code", and its now handled by the function itself internally. If needed we can have another variant of the function with a custom message.