[BUGFIX] Typecast cookie value to string

The cookie might be null, therefore the INSERTquery fails in
indexed_search.

As a solution, use a type cast to string.

Change-Id: If9e650ee713c75420859813546d138000b3023ff
Resolves: #55989
Releases: 6.2
Reviewed-on: https://review.typo3.org/28281
Reviewed-by: Christian Kuhn
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer