Extended inflation in scalar-tensor theories of gravity