This is based on previously discussed patches https://reviews.llvm.org/D55115 and https://reviews.llvm.org/D44781
D44781 was abandoned on the understanding that tracking the alignment of function pointers was unlikely to be beneficial.
D55115 was reverted after it emerged that it caused a code size regression because it removed an assumption about the alignment of function pointers.
This patch combines those two:
Add function pointer alignment to DataLayout.
If the function pointer alignment is set, use it. Otherwise, continue to assume that the alignment is 4 as before.