Added update to Logbook::appendRow to make more robust if OCPN should cr...

...ash. This will ensure all automatically added rows will make it into the file on disk.

Also corrected a compile error in logbook_pi.cpp

Addresses FS#1534