Reconfigurable Intelligent Surface Based RF Sensing: Design, Optimization, and Implementation