Py2RPM: trim zeroes from RPM versions

For RPM, version 2.0 > 2, so we should trim zeroes from RPM version
same way we do for requirements.

The code is backported from master branch from change
I2df8a47f0115de2684777b64db42e08d50ef4115 by Joshua Harlow.

Change-Id: I947daf3fe21eed7ca15fdcf2b75486d476ec87c0