Fix issue in addAssetAvailability

Explicitly save first new instance of AssetAvailability.
Modify course_get_assets to return only one copy of each asset
Solve issues detecting free slots
Modified both AssetResources for getting the asset list by course
Added the possibility to edit assets of a course from teacheradmin interface