Add lvalue/rvalue traits

* Add lvalue/rvalue traits
  * `rvalueOf`/`lvalueOf`

(commits extracted from pull #954)