Extract GPU code out of SyncedMemoryTest::TestCPUWrite
Separate TestForward into Test{CPU, GPU}Forward in HDF5OutputLayerTest