Task-Based Design of Ad-hoc Modular Manipulators