Code revision for flipping eigenvector signs

When the eigenvector weights sum to zero, flip the signs to be
consistent with the component in the first row. Also removed inline code
to function FLIPSIGN.