Fix security group race condition while listing and deleting rules

Previously, there was a race condition that could occur if one was listing
a security group which contained a rule which referenced another security
group as an additional api call is used to look up the security group's
name which is returned (rather than id) via the API. The problem occurs if
this security group is deleted in which case a 404 was raised.
This patch fixes this issue by catching the 404 and ignoring the rule as
its already deleted as there is a constraint enforced that you cannot
delete a security group if another security group has a rule that references
that security group.

Change-Id: I3855b8d3a1bd2f7c88901da071f9bd5581bd56e4
Closes-bug: 1262566
(cherry picked from commit eb84cfb4ef7376401f48488d4810714c2664e5fa)
Revert "Remove broken quota-classes API"

This reverts commit 7d22153d05c67bb0bf4838efdb17b3360ec2e367.

The quota_classes API was used to set default quota values
so it shouldn't have been removed, so reverting a series
of changes that removed the API and it's internal code.

Related mailing list thread on the topic:

http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html

Partial-Bug: #1299517

Conflicts:
	doc/api_samples/all_extensions/extensions-get-resp.json
	doc/api_samples/all_extensions/extensions-get-resp.xml
	nova/tests/integrated/api_samples/all_extensions/extensions-get-resp.xml.tpl

The conflicts are due to Mark McLoughlin's timestamp-format series
of changes on master (Juno).

Also note that quota_classes.py was changed due to
commit c75a15a4 to rename the NotAuthorized exception
to Forbidden.

Change-Id: I7890e6b41d4ebf19944c1d4db65111fcc4c45463
(cherry picked from commit 35338d54ad2f76807011a5b666df434eec5369b2)