Check that PreserveStackTrace method exists on the current platform.

- Ignore MemberAccess permission exception.
- Add 2 test for exceptions on partial trust and stack trace.