DownloadService: use database ID instead of server ID

Using the server ID will make the DownloadService update
the local_uri for all messages with that server ID. This
led to updating the outgoing message too if the message
was sent to ourselves (I know, silly case, yet it's a bug)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>