webui: Use display name when displaying barclamp name as title

This makes the title consistent with the displayed name in the list of
barclamps.
avoid undefined method `foo' for nil:NilClass when state is nil

Sometimes node state can be nil, e.g. (AFAICS) if logrotate restarts
chef daemons at the same time as a Crowbar API query:

  https://bugzilla.novell.com/show_bug.cgi?id=838142#c3

We should consistently return a String ("unknown") even in these cases,
to ensure that code like

  node.state.titlecase

doesn't barf.
Avoid browser password safe dialog in barclamp edit forms

For example, cinder backend password input tags trigger that but the
only password worth storing would be the crowbar admin password (if we
would use Rails instead of digest-auth).
Do not save node on allocate if already node is already allocated

This fixes an issue where the save call done for the allocation is
racing with the save call of a state transition for the same node.

It's not optimal for sure, though.
rescue StandardError not Exception

http://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby
don't discard valuable debug information from exceptions

https://bugzilla.novell.com/show_bug.cgi?id=840255
style tweak for consistency
explain how data structures order in series then in parallel

ServiceObject#apply_role is a grossly overgrown and complicated
method, and also just happens to be probably the most critical
part of Crowbar's core engine.  So anything we can do to make
it more legible is a worthwhile investment.
ServiceObject#apply_role: rename nodes to pending_node_actions

ServiceObject#apply_role is a grossly overgrown and complicated method,
and also just happens to be probably the most critical part of Crowbar's
core engine.  So anything we can do to make it more legible is a
worthwhile investment.  Renaming and explaining cryptic variables helps,
as does moving variables closer to where they are used.

This is a refactoring only, and should not affect behaviour in any way.
rename cryptic "snodes" to "non_admin_nodes"

ServiceObject#apply_role is a grossly overgrown and complicated
method, and also just happens to be probably the most critical
part of Crowbar's core engine.  So anything we can do to make
it more legible is a worthwhile investment.

This is a refactoring only, and should not affect behaviour in any way.
rename cryptic "r_nodes" variable to "nodes_in_batch"

ServiceObject#apply_role is a grossly overgrown and complicated
method, and also just happens to be probably the most critical
part of Crowbar's core engine.  So anything we can do to make
it more legible is a worthwhile investment.

This is a refactoring only, and should not affect behaviour in any way.
webui: Improve bulk edit view after Hyper-V merge

Do not make platform and license key editable for allocated nodes.
Simplify code around the target platform

Also use pretty target platform in more places.
webui: Only show license key if target platform has one
Add CrowbarService.require_license_key? helper

This avoids having to reimplement the same check. It might be an easy
check for now, but it could become more complex later on.
cleanup: Use blank?
Allow reboot/shutdown on nodes without IPMI

We have code falling back to ssh commands when IPMI is not there.
rename variables to "node_name"

ServiceObject is a complicated class, and also just happens to be
probably the most critical part of Crowbar's core engine.  So anything
we can do to make it more legible is a worthwhile investment.

This is a refactoring only, and should not affect behaviour in any way.
rename cryptic "elem" variable to "role_name"

ServiceObject is a complicated class, and also just happens to be
probably the most critical part of Crowbar's core engine.  So anything
we can do to make it more legible is a worthwhile investment.

This is a refactoring only, and should not affect behaviour in any way.
don't add deleted nodes to the run order (bnc#840255)

If a node is deleted but still associated with a proposal,
and then it is removed from that proposal and the proposal
applied, we need to avoid attempting to adjust the run list
for that node, or attempting to run chef-client on that node,
or queuing actions.

Previously this would result in a crash such as:

  undefined method `[]’ for nil:NilClass

leaving all nodes stuck in the applying state, and
the proposal stuck in the committing state.

  https://bugzilla.novell.com/show_bug.cgi?id=840255

See also

  https://bugzilla.novell.com/show_bug.cgi?id=839714