Added pwapi.functions.php: Core functions of the pwapi
Made the api.php dynamically create the apitask array from the contents of api/lib/commands/ directory

Signed-off-by: Arthur R. Wuterich <arthurwut@gmail.com>