Fixed some bugs around Rest API

      - Don't use primitive types to parametrize HttpEntity
      - Generate HttpHeaders only when needed
      - Generate HttpEntity only when needed
Do the analyse of path parameter before HttpEntity generation to avoid a path parameter considered as the entity
Added some tests around Rest API
Merge pull request #496 from excilys/FixRestAPI

Fix rest api