The loss of marshes, bogs and swamps is driving a global decline in dragonflies, conservation research finds.