Move lightweight_test and no_exceptions_support to core