Add generalized repmat function as repeat
Document repeat function

Extend ind2sub and sub2ind to accept a reusable array of indices
Expose rem1 and fld1, defined by analogy with mod1
Restore basic ind2sub definition
Merge pull request #3605 from JuliaLang/jmw/repeater

Add generalized repmat function as repeat