x265: refactored to generic, fixed build versioning
Merge pull request #4799 from codyopel/x265-refactor

x265: refactored to generic, fixed build versioning