Adding autoincrement check

I have never worked with Perl before. It uses a trick to get the maximum unsigned integer value and checks all tables to see if the autoincrement index is near capacity.