Fix issue 1003 F31
Also for Joomla3/F3.1 - autocreate pk element as internalid

This fix is already committed for F3.0, but 3.1 needs it as well. Without this the pk element was autocreated as "field" instead of "internalid" when new list was created on existing table. 
The same happened also to joined groups when new table joins were created via list admin to table without any list (and internalid element).
fixes #1018 - related data options not showing when editing a list, for newly created dbjoin elements
Merge pull request #1013 from jaanusnurmoja/patch-38

Also for Joomla3/F3.1 - autocreate pk element as internalid
Merge pull request #1007 from Sophist-UK/fix_issue_1002_f31

Fix issue 1003 F31
possible fix for #1014 - conflict with advanced module manager
Merge branch 'joomla3' of github.com:Fabrik/fabrik into joomla3
Merge branch 'joomla3' of git://github.com/Fabrik/fabrik into joomla3

Conflicts:
	administrator/components/com_fabrik/models/list.php
Merge branch 'joomla3' of github.com:jaanusnurmoja/fabrik into joomla3