Make is supposed to only compile dependencies when they change but
`make check` always compiles them, making the test suite run slow.
```
$ make check
cc ... build/mpc.o
$ make check
cc ... build/mpc.o
```
The same occurs for other targets like `build/test-dynamic` and
`build/test-static`.
This happens because these targets have the `$(DIST)` directory as a
dependency, and directories always change whenever members are added,
removed or renamed.
Fix this by changing the `$(DIST)` directory dependency to a
`$(DIST)/.dirstamp` file.
Now `make check` compiles dependencies only once.