Added additional parameter checks and test cases for parameter checks

* Added or refined parameter checks in `BufferImpl`, `DatagramSocketImpl`, `DatagramSocketOptions`, `DnsClientImpl`, `EventBusImpl`, `DeliveryOptions`, `AsyncFileImpl`, `NetworkOptions`, `RecordParser`, `AsynchronousCounter` and `SharedDataImpl`.
* Added unit tests for several existing parameter checks, simplified several unit tests.