add api function that gets the last time a friend was seen online

I'm not sure if updating last_online every ping is the best thing to do but it's the simplest solution I could come up with for making sure all your online friends are updated before you exit (and you can actually save it). There are other more efficient but complicated solutions if this isn't good enough.

Also, this is going to wipe friendlists again.