Item12671: switch autobuild to Getopt::Long

this introduces:
    --autobuild (previously: -sven)
    --stable (build configured stable branch instead of trunk)
    --update (update this script from svn)
    --verbose

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17184 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: fix checkout of stable branch

also: log removal of unknown files, allow working/tmp to already exist

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17185 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: make webspace configurable

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17186 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: make email configurable

and use local sendmail for easy mail sending

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17187 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: fix MemoryCycleTests (wouldnt find setlib.cfg otherwise)

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17188 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: add $foswikihome/lib/CPAN/lib to FOSWIKI_LIBS when calling build.pl

...otherwise it wouldn't find Class::Load. This should really be put in
@INC automatically, not sure why this is not (no longer?) the case.

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17189 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: define $cvs before using it

(cherry-picked from trunk)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17190 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12671: make sure project name does not contain spaces

$this->{project} can apparently become "Foswiki-1.2.0_999 svn-auto17114",
but build scripts elsewhere don't expect spaces in directory names (e.g.
when exporting variables to the shell), so make sure there are none

(cherry-picked from trunk, squashed with fixup commit)

git-svn-id: http://svn.foswiki.org/branches/Release01x01/core@17191 0b4bb1d4-4e5a-0410-9cc4-b2b747904278