test: remove unnecessary Buffer imports

We don't use the global Buffer throughout the lib/ to avoid circular dependency issues in core, and we have a custom lint rule to prevent doing so by accident. But before #5371 this rule used to be applied to the whole project instead of just lib/. Now that the rule only applies to the relevant part of the codebase, all the instances of

const Buffer = require('buffer').Buffer;

and

const { Buffer } = require('buffer');

can be safely removed from the files in the test/ directory.