Make file structures dynamically allocated

Current td->files is an array of files, make it an array of pointers
instead and allocate individual file structures on the fly. This is
a preparation patch for file sharing.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/log.c b/log.c
index 8754eb0..f6fbaeb 100644
--- a/log.c
+++ b/log.c
@@ -65,7 +65,7 @@
 		 * invalid ddir, this is a file action
 		 */
 		if (ipo->ddir == DDIR_INVAL) {
-			struct fio_file *f = &td->files[ipo->fileno];
+			struct fio_file *f = td->files[ipo->fileno];
 
 			if (ipo->file_action == FIO_LOG_OPEN_FILE) {
 				assert(!td_io_open_file(td, f));
@@ -81,7 +81,7 @@
 		io_u->offset = ipo->offset;
 		io_u->buflen = ipo->len;
 		io_u->ddir = ipo->ddir;
-		io_u->file = &td->files[ipo->fileno];
+		io_u->file = td->files[ipo->fileno];
 		get_file(io_u->file);
 
 		dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,