Evolution of crystal structure and piezoelectric properties of Sm-doped bismuth ferrite across the rhombohedral-orthorhombic phase boundary