initial creation of O.import_site_wp -- not yet ready for use

created initially by using export_ as a template like so:
sed 's/export_site/import_site/g' <\
	Otto.d/O.export_site_wp > Otto.d/O.import_site_wp
this commit only contains the part I've been working on,
with those lines only modified by sed so far excluded from
the commit for clarity.
currently, the help and options have been specified and the
tests and logic to sanity check and fill in any blanks
are almost complete.
added '-D' (docroot) flag to O.chk_dom_dv40

this flag tells O.chk_dom_dv40 to print the docroot for the domain
instead of just confirming its existence.. should be useful for
scripting and scouting
fleshing out more of the logic in the import_site function
creation of O.chk_db function, which tests a database connection

we have already O.chk_db_dv40, but that just checks for db existence
by using the psa admin creds.  this new function has an option (-e)
to just run that check and exit, instead of testing with credentials.
in this first version, the function is not _yet_ able to guess (-g)
the variables it needs for its credentials.
minor formatting issues introduced some bugs...fixed that.
should be finished with _import_site_wp checks and logic

the checks are all thorough and should cause the script to fail
out early if we are missing some crucial component for proceeding.
some of the checks (which also include the logic for determining
what a bunch of the variables should be set to) will need some
TLC in the near future to help generalize this function; currently,
it will only work if the domain is not yet created on the dv...
modify guess (-g) functionality of O.mod_db_wp

prefer vars from import_ over export_ when guessing
change guess (-g) flag of O.mod_fs_wp so that it does something

now uses O_mod_db_wp_target_path and O_import_site_wp_docroot
if there seem like other good choices for what to guess from, we
could modify that, but we may also have 'natural' guessing built
info the tests section
add logic to O.mod_cfg_wp which adds http:// if no protocol included in URL
O.export_site_wp now converts absolute path if path or docroot begin . or ~
the action code for O.import_site_wp is complete

this function should now be able to fully import a site, at least
if you start with an export made by the O.export_site_wp function.
in theory, this function can handle other manual exports if given
enough info, but there are a few items on the todo list for this
function as far as generalization is concerned (right now, it should
break if it does not create (deploy) the domain and so forth itself)

tl;dr: should only work if domain you are importing to has not yet
  been added in Plesk.  will try to shake that restriction soon.
changed O.import_site_wp to look for data_docroot dir inside data dir

Since recent changes to O.export_site_wp will convert relative paths
beginning with '.' or '~' to absolute paths, the RSYNC will also
always get a full path now.  This means we can expect the docroot to
show up as a nested folder inside the ~/Otto.domain_name directory.
O.import_ now handles this properly and expects this to be the case;
this is a good thing, as it is safest to never leave sensitive data
like .vars and .sql in docroot folders unless we really have to,
lest we forget and leave them about.

If you've specified a .sql or .vars file on the command line and
that file lies within the data_docroot, the script should move it out
to of the data dir entirely right now.  This should be augmented so
it will find other copies (potentially from other Otto agents leaving
things behind), but that may\may not be better addressed by a general
Otto cleanup function...TBD but worth coming back to.
fixed silly bug so it pulls real home dir instead of shell if resetting $HOME
for some reason, it was not expanding ~/...$O_... correctly

replaced with $HOME/...$O_... and seems to work that way...
O.gen_dom_dv40: changed default sysuser guess, added flags to Plesk cmd

if no sysuser is specified, the function would try 'domain.com_ftp',
it will now instead try 'domain' for that user
also, added the '-hosting true' and '-hst_type phys' flags to the
/usr/local/psa/bin/subscription command that generates the domain,
just to make sure we don't get any funny business.
O.gen_pw: changed class of special characters it uses for pw gen

running a gen_dom i would still occasionally see this message:
	Wrong syntax for command's '-passwd' parameter.
	Your password is not complex enough. According to the
	server policy, the minimal password strength is Strong.
	To improve the password strength, use numbers, upper and
	lower-case characters, and special characters
	like !,@,#,$,%,^,&,*,?,_,~

the special char class was '!.^_@' and is now '!@#$%^&*?_~'
O.gen_db_dv40: dbname/dbuser are now s/./_/g so Plesk/mysql won't barf
O.gen_db_dv40: fix trailing slash bug in previous commit, add / and \

http://dev.mysql.com/doc/refman/5.1/en/identifiers.html says that
'/', '\', and '.' are no good for db\table names, so we'll convert
all of those to '_' if they are in dbuser or dbname
O.import_site_wp: when generating short name from domain name, s/[./\]/_/g
O.import_site_wp: oops!  (( n = 0 )) test needs to be (( n == 0 ))