Design optimization of piezoresistive cantilevers for force sensing in air and water