Avoid defining a new type every time getDefaultProperty is called
Part of lhcb/LHCb#397
This change saves 10 seconds on the test configuration I'm using.
To see the effect in a micro benchmark:
In [1]: %%timeit
...: class c:
...: pass
...: a = c()
...:
...:
8.34 µs ± 120 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
In [2]: class c:
...: pass
...:
In [3]: %%timeit
...: a = c()
...:
...:
146 ns ± 1.16 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)