Implement function for dumping the hash table onto the disk.

The file format is pretty simple: new line separated with each line
contatining one key value pair from the table.

The function requires that all the values stored in the table are of
same type.