An examination of the variable stars in the unusual, metal-rich globular clusters NGC 6388 and NGC 6441