Flesh out wanted_attrs handling, and add some infrastructure for using it. [1/6]

This pull request series lays more groundwork for making how we handle
making sure that jig runs get just the attributes they need, instead
of a bunch of excess ones that they probably shold not have access to
anyways.

* Allow wanted_attrs to declare where they want the attribute data at
  when the jig infrastructire builds its JSON blob to hand off to the
  jig.  This will allow for a modicum of location independence between
  how roles export their attributes vs. how they import them.
* Optimize how we get all the ancestors and descendants of a given
  noderole to kill some excess ournd trips to the SQL server by moving
  the query recursion from Rails into postgresql.


 crowbar_framework/app/models/attrib.rb             |  7 +-
 crowbar_framework/app/models/barclamp.rb           |  6 +-
 crowbar_framework/app/models/node_role.rb          | 94 ++++++++--------------
 .../app/models/role_require_attrib.rb              | 18 ++++-
 .../migrate/20120731225511_create_role_requires.rb |  1 +
 .../db/migrate/20120731310000_create_node_roles.rb | 19 ++++-
 6 files changed, 77 insertions(+), 68 deletions(-)

Crowbar-Pull-ID: 435923b0a0746ceaecb6283577ca9f9f79e1be4a

Crowbar-Release: development