input: stats: fix data-race
Locks were used for reading but not for writting.
WARNING: ThreadSanitizer: data race (pid=1969)
Write of size 8 at 0x7b3c000005c8 by thread T6:
#0 input_rate_Add ../../src/input/stats.c:122 (libvlccore.so.9+0x93036)
#1 AStreamReadBlock ../../src/input/access.c:239 (libvlccore.so.9+0x55591)
#2 vlc_stream_ReadRaw ../../src/input/stream.c:439 (libvlccore.so.9+0x9333d)
#3 vlc_stream_ReadPartial ../../src/input/stream.c:462 (libvlccore.so.9+0x938e2)
#4 ThreadRead ../../modules/stream_filter/prefetch.c:89 (libprefetch_plugin.so+0x2f8d)
#5 Thread ../../modules/stream_filter/prefetch.c:253 (libprefetch_plugin.so+0x336f)
Previous read of size 8 at 0x7b3c000005c8 by thread T4 (mutexes: write M121):
#0 input_stats_Compute ../../src/input/stats.c:84 (libvlccore.so.9+0x92e4f)
#1 MainLoopStatistics ../../src/input/input.c:638 (libvlccore.so.9+0x75225)
#2 MainLoop ../../src/input/input.c:724 (libvlccore.so.9+0x7d8ac)
#3 Run ../../src/input/input.c:465 (libvlccore.so.9+0x7db97)