One of Spain's main tourist destinations is set to ban apartment rentals to tourists in a bid to improve housing for local residents.