SMS application will backup all the messages found. You can try using Dropbox to backup everything, including contacts and messages. On the other hand, WhatsApp contacts are synchronized with the contacts found in the Phone application. Attach a Google account, and perform the sync by checking Contacts. Next time you attach the account to another device, it will sync them and WhatsApp will identify these contacts.