Add generic IO operations for reading from and writing to files.

To use loadFromFile(), a class T needs to implement the following operator:
QDataStream & operator >> (QDataStream &stream, T &obj);

To use saveToFile(), a class T needs to implement the following operator:
QDataStream & operator << (QDataStream &stream, const T &obj);
Additionally, the class T has to be friends with:
::saveToFile<T>(const T &obj, const QString &fileName);