Set up the base model based on the connector types

/to @ritch 
/cc @bajtos 
/cc @ShubhraKar 

Not all connectors support PersistedModel. The PR makes it conditional. Before the fix, the following code will fail:

```js
// ds is the data source w/ a REST connector
var model = ds.createModel('myRestModel');
```

The model will accidentally inherits from PersistedModel, which is not desired.