Welsh councils plan cuts to plug £500m budget gap