Fix incorrect trait initialization

Currently, when we try to get trait, the api service uses storage
data to directly initialize the trait model. However, the trait class
init method expects value field as wsme.text type, while in storage,
it could be int, float, or datetime. So, end user will get 400 error
in such scenarios.

The static method _convert_storage_trait() in Event class can convert
a storage trait data to api trait object, we can use it to fix this
bug. Also, this method should be in Trait class instead of Event class,
This patch does this refactor too.

Change-Id: Ia7bf667967a31a3cc6e8d457f3b6330ffc728471
Closes-Bug: #1324523
Merge "Fix incorrect trait initialization"