[test] feature_init: prevent UnicodeDecodeError errors when opening log file
Summary:
open log file as a raw byte stream (fixes core#23989)
The log file can be read partially while some emoji is being written, causing a UnicodeDecodeError. It did not make sense to decode the file anyway, as the file content is not being used. We read the file only to count the log lines.
This is a backport of core#24039
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12617