Refactor the registry reporting functions (internal API) to become static, and use get_current_test() under the hood to dispatch the event to the appropriate registry. This reduces the amount of code at the check call sites, and reduces compilation time.
All check macros (as well as sections) maintain a "current location" stack of file/line information. This is used by the registry to obtain the file/line information on each assertion, instead of having to pass this information to the assertion reporting functions.
Whenever an unexpected exception is thrown (i.e., outside of the macros that explicitly check for exceptions), the "current location" stack is preserved so that the location where the exception was thrown can be reported. This implements #141.
This PR does the following:
get_current_test()
under the hood to dispatch the event to the appropriate registry. This reduces the amount of code at the check call sites, and reduces compilation time.