port TRIM support from FreeBSD which came from IllumOS
cleanup and add knob to control TRIM support