Optimization of a Reconfigurable Manipulator with Lockable Cylindrical Joints