Add a more descriptive error message for messed up cache file error

Addresses this ticket: http://manage.dimagi.com/default.asp?131898

Gives a cleaner error message to the user:

    "Unfortunately an error has occurred on the server and your form cannot be saved.
    Please take note of the questions you have filled out so far, then refresh this page and enter them again.
    If this problem persists, please report an issue."

Note that we don't expect this error to happen very frequently at all.
Added `errors='replace'` in latest commit.