Spontaneous bending of piezoelectric nanoribbons: Mechanics, polarization, and space charge coupling