Researchers have discovered that swearing can be used to our advantage to make us stronger and more resilient.