Re-enable copying output back from device for testing
Re-add freeing of device memory
Fix weight row pointer size and indexing

Now rowptr_w[0] is unused/undefined. Values start at rowptr_w[1], with index i
corresponding to the weights between layer i and i-1.