Second order optical nonlinearity in silicon waveguides: inhomogeneous stress and interfaces