Semiconductor device comprising metal gates and a silicon containing resistor formed on an isolation structure