Fix the arguments of sameTail and make sameHead and sameTail @safe
Some fixes according to the comments by @ monarchdodra
Merge pull request #1431 from tom-tan/fix-array-sameHead-and-sameTail

Fix the arguments of sameTail and make sameHead and sameTail @safe

Merged.