Allow as_dict with no assembly_id FK set in Component

Component.assembly_uuid used to raise an exception when no assembly_id
was set. It was an acceptable behavior but when you were calling as_dict
you were getting a ResourneNotFound and couldn't retrieve your dict.
The purpose of this patch is to allow the use of as_dict with no assembly
set as FK.

Change-Id: I3518e0dfb3f85631260474ba465146314e48a12c
Closes-Bug: #1306731
Test types with Component and test extra_keys in from_db_model

Plan db object is removed in add-plan-in-swift, so we now
test types with Component instead of Plan db object.
Also added a unit test for extra_keys in from_db_model.

Change-Id: Ie67f646b0018dd3409ceed89f4f838ee8b447ecb