Uber and Cabify have announced they could leave Barcelona after months of conflict with taxi drivers.