pkgix: Support optional prepare function

Allow splitting of preparing and building of packages. Furthermore,
explicitly allow using build_dir in pkgdesc-file functions. It is
available even when declared, local, but this makes it explicit.

Signed-off-by: Marco Elver <me@marcoelver.com>
pkgix: Support optional checkdepends field

Signed-off-by: Marco Elver <me@marcoelver.com>
pkgix: Support optional builddepends field

Signed-off-by: Marco Elver <me@marcoelver.com>