build: Use correct value of %dist in RPM and SRPM dependencies

RPMs are built in the mock chroot, so filenames in dependency rules should use the value of %dist from the mock - typically a CentOS value such as '.el6'.   SRPMs are built outside the mock chroot, so their names will include the value of %dist set by the host operating system - for instance '.fc18'.

This change fixes some, but not all, cases where we rebuild packages more often than necessary.