XMPPCapabilities should update c element if present

Hi Robbie,

I noticed that calling XMPPStream's resendMyPresence results in XMPPCapabilities adding multiple c elements to the presence stanza. Eg:

```
<?xml version="1.0"?>
<presence>
  <show>xa</show>
  <priority>-42</priority>
  <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="H0DgZZ7mWAHrG9drIcqF5Ibi/aM="/>
  <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="55hQhV5646hg5rb9E8LVHwpI50k="/>
  <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="55hQhV5646hg5rb9E8LVHwpI50k="/>
</presence>
```

This patch makes XMPPCapabilities replace an existing element if present but otherwise append the element as before.

Cheers,
Andrew