On quadratic divergences in supergravity, vacuum energy and the supersymmetric flavor problem