modules/pv: fixed params and param transformation

- params need to be taken from sip_params field of sip_uri struct
(cherry picked from commit e54b3ec673cb32664a1e8de2e591190f22216724)
modules/ims_registrar_pcscf: fix log
core: fixed several clang compiler warnings

(cherry picked from commit f0fb6f1e9fbb2f7f0c2bed5ba0d50a56cf5cf444)
(cherry picked from commit 90681624c54f0ec0b1259e205bcc0274316b4549)

Conflicts:
	parser/parse_fline.c
db_flatstore: update timestamp for kamailio specific rpc rotate

- do also in 'rotate' command, not only in 'k_rotate'
- from a patch by Abdelkader Allam

(cherry picked from commit b15aefa31e45f1ad6a45b64905f9fae24e0f790e)
(cherry picked from commit d75bc3b69151a9d0391309e6bb51784f3b6b9a83)
usrloc: avoid double locking when preloading attributes

- reported by Seudin Kasumovic, FS#378

(cherry picked from commit 888635bfa3719afeeea6f5f0d407aa862ceb34ac)
(cherry picked from commit 8df9d2336e7de2648288cf8ff6821e6820d88da9)
pv: use int index for looking up flag index

- some functions used for check may return negative on error

(cherry picked from commit 30359b3cfce2ce909153e06b1954778c4eababa7)
ctl: removed not needed extra paranthesis

(cherry picked from commit efda774f6391f1e909a9967898c64fb25f53eeba)
tls: removed unsigned int comparison with <0

(cherry picked from commit 7d6dc390bac2b49615444bcbad74cd39f3c82302)
pike: memset of address print buffer with proper size

(cherry picked from commit d54eb083f59fb55ccbc79e49b5b3e05426bd3795)
ratelimit: signed check for pipe number in rpc_set_queue()

- rpc can reand signed value

(cherry picked from commit ed034d4d9096d8c77269828c8efdafb26eac5372)
maxforwards: use standard format instead of GNU old-style field designator

(cherry picked from commit cd04947b0ccb1c861274483f458bfc7f4329accb)
pkg/debian: set version to 4.0.5 in specs
pkg/rpm:  set version to 4.0.5 in specs
Makefile.defs: version set to 4.0.5
ChangeLog: content updated for v4.0.5
modules/pua: added some missing lock releases
(cherry picked from commit 4eb338611e716e7a32f252acbae52bace6047a0a)
tmrec: updated the examples with tmrec duration

- hint to read rfc2445 for duration format

(cherry picked from commit 99d1170469c60206992c083f2ba0e9dc6b580d37)
(cherry picked from commit df0218611b8f27ccaa924b8f88560c2e81966823)