Make the Writer generic in terms of the datatype it writes

The "start" function now takes an argument "generate_data", which
will generate the data to be written to the shared resource each
time it is invoked.

Signed-off-by: John Else <john.else@citrix.com>