Add optional builds of tests and docs

Similar to the present BUILD_EXAMPLES this commit introduces options for test
and doc builds

Signed-off-by: Justin Lecher <jlec@gentoo.org>