Just to share a few thoughts and initial discoveries on how this can be done.
So far I have managed to move a test installation to Wildfire 3.1.1. This is very rough, I'll add some more details when I have time. I guest it is even possible to go to Openfire 3.7 directly by applying the required database changes.
* read the wildfire/openfire manual!
* export the IM mysql tables as user zimbra:
* create a new mysql database and user to hold the new data
/opt/zimbra/mysql/bin/mysqldump --user=root --password=$mysql_root_password --socket=$mysql_socket --single-transaction --flush-logs zimbra jiveExtComponentConf jiveGroupProp jiveGroupUser jiveID jiveOffline jivePrivacyList jivePrivate jiveProperty jiveRemoteServerConf jiveRoster jiveRosterGroups jiveSASLAuthorized jiveUserProp jiveVCard mucAffiliation mucConversationLog mucMember mucRoom mucRoomProp > /tmp/jive.sql
* import the IM tables
* download and extract wildfire 3.1.1 from Ignite Realtime: Download Landing to /opt/wildfire
* go through the mysql upgrade scripts and compare the changes to your IM database, apply the required changes and add the missing tables
* start wildfire and go the setup wizard
* point it to your newly created database
* use LDAP as user database and point it to Zimbra's LDAP, also check here: LDAP Wildfire - Zimbra :: Wiki
* done ;-)