[ELF] Fix conditions for max-page-size.

Fix comments from Rui, also adds a test.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@221860 91177308-0d34-0410-b5e6-96231b3b80d8
[ELF] Fix segment alignment.

The segment alignment for PT_LOAD segments is set to page size by default, but
if any of the sections require an alignment more than the page size, the segment
alignment property is set to the maximum alignment of the sections that are part
of the segment.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@221862 91177308-0d34-0410-b5e6-96231b3b80d8