Selective detection and removal of mercury ions by dual-functionalized metal–organic frameworks: design-for-purpose