appserver: separate cli and http server

* move server related code into server module
* use server factory in remaining cli appserver module
appserver: factor out boiler-plate code

much better to read, now
move some methods into commons module

will be used around the newly created middleware modules
remove unused code

this function is never used. Can be removed
break up large handler into smaller chunks

implement handler using connect middleware
factor out appsload related handler into module

this is the most complicated module and might still need some more
cleanup. But for now, this should be fine
move manifests related code into own module

make server implemantation more clean, everything manifests related is
now encapsulated in manifests middleware
move local files related code into own module

make server implemantation more clean, everything related to local
javascript files is now encapsulated in localfiles middleware
move proxy middleware into own module

now server only contains code to setup the server. Everything else has
been moved to independent middleware modules.
Fixed copyright headers
appserver: serve all local files if found

until now, only js files have been served locally. Now every file that
is found in on of the options.prefixes directories will be served.
move appending of /apps/ to appsload middleware

it’s only needed there and it will complicate the implementation of
localfiles, so appsload middleware now detects the /apps/ part
automatically.

also needs fixes for:
karma-ox-apploader
appserver/localfiles: serve more local files

remove version "hack", add 'core' as 'index file'. Also we need to provide proper
mime-type for 'core' and 'signin' manually since these have no extension.
appserver/localfiles: be more verbose
Reduced verbosity: "Could not read ..."
fix loading of localfiles from tests

adjust appserver middleware and karma-ox-apploader regex to work with
testserver setup
fixup for 0904dfee8f: fix loading of localfiles from tests

appsuite might be located in different base directories. /appsuite/ is
used on local development machines (those using appserver); /base/ is
used by tests running on karma web server. In both cases localfiles must
strip the base directory from the path of the url, to lookup the files
locally. This should now be more robust.
Moved last libs to 3rd.party
add local:error option to only show errors in local files middleware

be less verbose and only handle the error case. This is very useful for
debugging files not served locally.
port appserver to grunt-contrib-middleware

since we have already been using the connect middleware internally,
this port is straight forward.