Add support for integer constants to SetPEFlags and SetPEOptFlags. This is Delphi compatible.

scandir.pas:
  + add function "get_peflag_const" to retrieve the value of a constant
  * dir_setpeflags & dir_setpeoptflags: first check for an identifier (value is retrieved through "get_peflag_const") and then read a value

+ added messages for illegal parameters for SetPEFlags and SetPEOptFlags respectively
+ added tests

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@24887 3ad0048d-3df7-0310-abae-a5850022a9f2