Conversion of silicone resin to silicon (oxy)carbide