added utils.swap

added a function for swap key:value pairs into value:key