package/populate_sdk: Move functions from package_* to populate_sdk_*

This fixes build failures introduced with "classes/buildhistory: implement history
collection for SDK" by moving the functions to files where only the specific image
type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES
were enabled.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
valgrind: Fix out of tree builds

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>