Added test for lazily data decoding

Also reduced the number of time-points in test_dataset.create_test_data from
1000 to 20 to speedup encoding/decoding tests.