fix: initialize root state as an empty object if state function returns no value (#927)
* assert state to be an object
Just a moment ago had hard time debugging this code:
```js
const state = () => {}
...
new Vuex.Store({
state,
modules,
...
})
```
If state is `undefined` and you use modules, Vuex can't create store. This small change will make it easier to find this error.
* fix styling
* provide default value for state as a function