allow timeout to be specified when creating a user-agent

I've been unable to run against our dev VM because the request times
out so I would like to be able to override the default.
do not import unused functions
pass timeout through to get_user_agent
allow timeout to be specified for get_*_name_from_id
allow timeout to be specified for foreach_database_or_template
use parse_opts

This commit is to separate out this change from the upcoming addition of
a timeout option.
add timeout option to list commands
add newline to help output
allow default timeout to be specified by env
Merge pull request #46 from nnutter/timeout

add timeout option to commands