rest: returns 409 when trying to recreate a resource

If a client tries to create a resource via POST and the resource already
exists, return 409 HTTP status code to indicate that this is the case.

Change-Id: I6cd0341844d5f3a79e1fc68fa5243d8ecf03fe1d