While fleeing the aftermath of a failed marriage, Hilary McPhee accepted a job in Jordan to write the autobiography of a Hashemite Prince. Living alone for the first time, she was plunged into extreme loneliness