serialize object and array values regardless of storage method

This fixes cookies storing `[object object]` instead of serialized data in issue https://github.com/grevory/angular-local-storage/issues/121