[webui] remove directory model in favor of API's
[api] make repository_architecture have a primary key

it's easier to delete and update it then - which is important for
update_from_xml not to store twice