Made getKeys return a unique array of keys.

This was causing applications to crash if there was somehow thousands of keys, but where most the same.
Fixed a few typos.
Add hyphen.
Shorten line.
Fixed a few more typos.
Improvements
Stashing limit/offset query values before performing total pagination count

Some database engines return zero, when using the count aggregate on a query with limit and offset. Just followed the same pattern for stashing the 'orders' clause before performing a count on the query, and adding back to the query when done.
Pivot updates recorded only if something updated
Fix associate on MorphTo
`attributesToArray` can handle instances of `ArrayableInterface`

basically some mutators can return instances of `ArrayableInterface`, and this case is not handled by `attributesToArray`, so put that condition in there
removed syntax error
DRYing up some code.
Fix conflicts.
Merge pull request #4249 from jarektkaczyk/4.1-fix-associate-on-morphTo

Fix associate on MorphTo relation
Fix order.
Merge pull request #4242 from jmshelby/4.1

Stashing limit/offset clause before performing total pagination count
Cleaning up a lot of code.
Merge pull request #4227 from JamShady/pull-request/pivot-update-only-includes-updated-items

Pivot updates recorded only if something updated
Use comment.
Merge pull request #4222 from GrahamCampbell/4.1-stuff

[4.1] Improvements