First version of Collection#_getForeignKeys(), minor refactor of the rest meta-info methods.