The arrest of several Catalan government officials by Spanish police as they crack down on preparations for an independence referendum in the region has sparked angry protests in Barcelona.