Make Spring Security's filter's order configurable and default to zero

Previously, Spring Security's filter had no configured order. Due to
the use of AnnotationAwareOrderComparater this meant that its order
defaulted to LOWEST_PRECEDENCE. This meant that a user had to declare
a FilterRegistrationBean for the filter and explicitly set its order
if they want another filter to run after Spring Security's.

This commit updates the security auto-configuration to assign a
default order of zero to Spring Security's filter, allowing filters
to be easily configured to run before it or after it. This default
value can overridden using the server.filter-order property. The
default order is also exposed as a constant on SecurityProperties,
allowing it to be referenced from other filter declarations.

Closes gh-1640
Make GroovyWebConfiguration conditional on spring-webmvc's availability

GroovyWebConfiguration creates a GroovyTemplateViewResolver which is
a UrlBasedViewResolver sub-class. UrlBasedViewResolver is provided
by spring-webmvc. Previously, if a user configured a web application
but did not have spring-webmvc on the classpath, the application
would fail to start with a NoClassDefFoundError for
UrlBasedViewResolver.

This commit makes GroovyWebConfiguration conditional on
UrlBasedViewResolver being on the classpath so that it backs of in
the absence of spring-webmvc.

Fixes gh-1793
Merge branch '1.1.x'
Programmatically configure logback defaults

Update LogbackLoggingSystem to programmatically configure logback
defaults rather than parsing XML. This change shaves about 100ms off
the start up time.

Fixes gh-1796
Upgrade to Spring 4.1.2.BUILD-SNAPSHOT
Add init command to the CLI

This commit adds a new command to the CLI that allows to initialize a new
project from the command line. It uses the Spring initializr service to
actually generate the project.

The command offers two main operations:

1. Listing the capabilities of the service (--list or -l). This basically
dumps the defaults of a given service and the list of dependencies and
project types it supports
2. Generating a project. By default, http://start.spring.io is used and
its configured defaults are applied. Running spring init would therefore
have the same effect as clicking the 'generate project' on the UI without
entering any extra information. No file is overwritten by default.

The generation can be customized with the following options:

* --boot-version (-bv) Spring Boot version the project should use
* --dependencies (-d) comma separated list of dependencies to add to the
generated project
* --java-version (-jv) Java version to use
* --packaging (-p) the packaging for the project (jar, war)
* --target the url of the service to use

The actual type of the project can be defined in several ways:

1. Using the --type (-t) option that identifies a type that is supported
by the service
2. A combination of --build and/or --format that can be used to uniquely
identify matching these tags. Build represents the build system to use
(e.g. maven or gradle) while --format defines the format of the generated
project.

The project is saved on disk with the name provided by the server through
the Content-Disposition header, if any. It is possible to force it with
the --output option. It is possible to overwrite existing files by adding
the --force (-f) flag.

The --extract (-x) option allows to extract the project instead of saving
the zip archive. By default, the project is extracted in the current
working directory but it is possible to specify an alternate directory
using the --output option.

Fixes gh-1751
Add Codahale metrics to /metrics endpoint

All metrics in the MetricRegistry have been added unconditionally for now.

Fixes gh-1795
Add missing method for Java 1.7
Switch to Dropwizard metrics 3.1.0

Fixes gh-1775
Add tests for AuthenticationManager injected into security configurer

See gh-1801
Polish
Apply eclipse formatting rules

Apply eclipse formatting rules to b2fe2dd9.

See gh-1751
Polish CLI init command

Rename a few classes and methods and extract some logic into helper
classes. Also change 2 char shortcuts to a single char.

Closes gh-1751
Restore CLI startup performance

Change InitializrService to use a late binding CloseableHttpClient
since the calling `HttpClientBuilder.create().build()` is slow.

Fixes gh-1764
Make a lazy AuthenticationManager if we think it's already configured

Instead of just blindly creating the default authentication manager, after
thic change we count the beans of type GlobalAuthenticationManagerConfigurer
and assume that if we detect more than we expect (one from Boot and one from
Spring Security) then the user is telling us they want to configure the
AuthenticationManager themselves.

Fixes gh-1801
Polish
Merge remote-tracking branch 'springsource/1.1.x'

Conflicts:
	spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
Use more specific WebSecurityConfigurer @Bean type

Update ManagementSecurityAutoConfiguration to return
IgnoredPathsWebSecurityConfigurerAdapter rather than
WebSecurityConfigurer<WebSecurity>.
Merge branch '1.1.x'
Improve OnBeanCondition Performance

Update OnBeanCondition to use a new BeanTypeRegistry which includes
optimized code when using a DefaultListableBeanFactory. The optimized
version calculates bean types only once per bean and caches the result.

Prior to this change the sample "pet clinic" application would spend
400-500 milliseconds evaluating OnBeanConditions, after this change it
spends around 120 milliseconds.

Fixes gh-1803