fix: make generation of types.d.ts work by upgrading build toolchain

We move from awesome-typescript-loader (which is unmaintained) to
ts-loader and also upgrade webpack to be able to use the latest version
of ts-loader.
This new tool also emits declaration files for test files. We add
a tsconfig.build.json which ignores .spec.ts files and we make ts-loader
use this configuration file.
4 jobs for topic/default/fix-build in 2 minutes and 35 seconds (queued for 17 seconds)
Status Job ID Name Coverage
  Deps
passed Deps #251329

00:01:31

 
  Test
passed CanBuild #251332

00:01:01

passed Format #251331

00:00:36

passed Lint #251330

00:00:47