Initialize reference counted class variables (or out parameters) with Nil.

hlcgobj.pas, thlcgobj:
  g_initialize: also initialize classes which are reference counted with 0 (aka Nil)


git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28865 3ad0048d-3df7-0310-abae-a5850022a9f2
Reference counted classes are considered as needing an init table.

symdef.pas, tobjectdef:
  * needs_inittable: if oo_is_reference_counted is set then the objectdef needs an init table


git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28866 3ad0048d-3df7-0310-abae-a5850022a9f2
Don't try to load the RTTI for reference counted classes.

defutil.pas, is_rtti_manage_type:
  * return False for classes even if tdef.needs_inittable returns True for reference counted ones


git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28867 3ad0048d-3df7-0310-abae-a5850022a9f2
Correctly handle reference counted classes inside their constructors.

psub.pas:
  * generate_bodyentry_block: force the reference count of reference counted classes manually to one after the class' instance was successfully created using NewInstance
  * tcgprocinfo.maybe_add_constructor_wrapper: once construction is successfully finished we need to decrease the implicit reference count we did after NewInstance, but without destroying the class should it reference count reach 0 (for this we pass the negative offset)


git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28868 3ad0048d-3df7-0310-abae-a5850022a9f2