COMPMID-3069: Improve compilation time by removing regex from test framework headers

Regex is used as an implementation detail by TestFilter and libnpy,
is an expensive header to parse, and also instantiates static objects.

Move TestFilter out of Framework.h by using a partial definition and
a unique_ptr instead of storing the TestFilter by value.

Move npy.h out of AssetsLibrary.h by moving part of a template
definition into AssetsLibrary.cpp

Knocks about 15% off compilation time of small test cases (for me,
knocked .7s off 5s compilation of HogDetector.cpp)

Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: I1dce18855d0752ec25b2165fddbc6861a4c55a76
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/229181
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2856
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/tests/framework/Framework.h b/tests/framework/Framework.h
index fb52fd8..11dedfe 100644
--- a/tests/framework/Framework.h
+++ b/tests/framework/Framework.h
@@ -29,7 +29,6 @@
 #include "Profiler.h"
 #include "TestCase.h"
 #include "TestCaseFactory.h"
-#include "TestFilter.h"
 #include "TestResult.h"
 #include "Utils.h"
 #include "instruments/Instruments.h"
@@ -41,11 +40,9 @@
 #include <memory>
 #include <numeric>
 #include <ostream>
-#include <regex>
 #include <set>
 #include <sstream>
 #include <string>
-#include <tuple>
 #include <vector>
 
 namespace arm_compute
@@ -54,6 +51,8 @@
 {
 namespace framework
 {
+class TestFilter;
+
 /** Framework configuration structure */
 struct FrameworkConfig
 {
@@ -346,7 +345,7 @@
     std::map<InstrumentsDescription, create_function *> _available_instruments{};
 
     std::set<framework::InstrumentsDescription> _instruments{ std::pair<InstrumentType, ScaleFactor>(InstrumentType::NONE, ScaleFactor::NONE) };
-    TestFilter                                  _test_filter{};
+    std::unique_ptr<TestFilter>                 _test_filter;
     LogLevel                                    _log_level{ LogLevel::ALL };
     const TestInfo                             *_current_test_info{ nullptr };
     TestResult                                 *_current_test_result{ nullptr };