[databases] Use current user ID if none is given when indexing

This will generate files for the current user like all other
files generated when using beat/beat.cmdline>

Fixes #78
4 jobs for 78_run_db_index_under_non_root_user in 3 minutes and 51 seconds (queued for 8 seconds)
Status Name Job ID Coverage
  Build
passed build_linux_36 #216948
docker-build

00:03:04

59.0%
passed build_linux_37 #216949
docker-build

00:03:02

59.0%
passed build_macosx_36 #216946
macosx

00:03:49

59.0%
passed build_macosx_37 #216947
macosx

00:03:35

59.0%