ecpg: Consistently use mm_strdup()

mm_strdup() is provided to check errors from strdup(), but some places
were failing to use it.