Remove code duplication in resolve_require_path.
Reduce repetition in check_syntax.
DynamicLibrary#initialize: Return early if no name to reduce nesting.
Remove nonsensical loop in DynamicLibrary#initialize.
Flatten logic in library loader.
Reduce repetition in ffi library loader by iterating over a list of names.