Implement pkg register --relocate

Convert pkg register to getopt_long,
add --relocate option to register somewhere else than in base
add -A for --automatic for consitency
keep -d for compatibility