Clean up errors found by LLVM warnings

Remove boolean return value from AddVersionConstraint. We weren't actually returning anything. Fortunately we weren't using the value returned either. 

Change GetPackageVersionVar to return pointer rather than reference, because we can return null.