[server] passing unique_ptr to methods

To provide exception guarantee

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
[lib] APropertyAccessor uses safer self_cast

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>