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 the names.
Merge pull request #2988 from yxhuvud/master

Some minor application of DRY.