ptx memory improvements

- Host allocations are now only done when the buffer will be used on host

- Making a buffer_t is now only done if the buffer will be used on device

- Dirty tracking of internal allocations is only done if the buffer is
used on host *and* device
Split the tests rule into build and run

This way you can build the tests with -j32 then run them with -j4

The tests target still works.