Change controllers sample code to initialize messages array

Walking through the tutorial, I was getting a client script error due to the messages array not being initialized in the controller. I've copied code from the [demo](https://github.com/btford/angular-socket-io-im) repo.