Allow Javascript new operator to apply to any object constructor

js.c only allowed keywords 'function' 'Function' or 'Object' after
'new' but js syntax allows any constructor function:

var name = new constructor_function( args );

ie an identifier where js.c allowed only keywords.
So changed js.c to allow any identifier as well as the keywords.
JavaScript: fix parsing of regular expressions in a return statement
JavaScript: fix parsing of files starting with a shebang

From Geany bug https://sourceforge.net/p/geany/bugs/1016/
JavaScript: don't choke on array lists
javascript: Fix scope after some constructs
JavaScript: don't choke when returning object literals
JavaScript: recognize assignation to a parenthesized expression
JavaScript: fix handling of various missing semicolons in loops
JavaScript: fix handling of parentheses around an rvalue

Properly skip parentheses around an rvalue, and then properly recognize
the surrounded value.  This allows to properly recognize e.g. rvalue
`({...})` as an object, or `(function(){})` as a function.  As the
implementation is tolerant regarding garbage after the statement,
function expressions called straight away (`(function(){})()`) are
implicitly supported.

This however removes support for the following invalid JavaScript
syntax that was previously supported as a function/method declaration:

	var func = () {}

This syntax is not present in the ECMA standard nor is supported by
popular JavaScript engines.

See:
 * http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
   section 13, "Function Definition"
 * http://ecma262-5.com/ELS5_HTML.htm#Section_13
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope#Defining_functions
Open file only when necessary.  Part of issue #123

This change is to make sure that we only open the file whose
language we are trying to figure out only when it is really
necessary.  In addition, code that supports templates (identified
by their extension .in) has been moved to execute before the code
that looks inside the files.  All unit tests pass.

Warning: I removed a piece of code commented thusly:

  This is needed for backward compatibility about #line directive
  behavior.

I do not know what this is about, either this is no longer
applicable or we need another unit test
Fix modelines used in tests, so Vim would parse them
doc: redact modeline section
Added initial D language support.
Improve determineVimFileType: do not require "set", search backwards

 - "set " or "se " is not required with the (newer) modelines
 - prefer later entries in case of multiple settings, by using a new
   strrstr function
Simplify `strrstr` and `strstr`

Thanks @vhda.
Ref: https://github.com/fishman/ctags/pull/125#issuecomment-63169399
xcmd: include types.h and wait.h to use WEXITSTATUS and WIFEXITED

This fixes a bug reported by @kaushalmodi in #131.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Merge pull request #125 from blueyed/fix-vim-modelines

Fix vim modelines handling
vim: parse function bodies, e.g. for defined commands
vim: move isCommand into a function
Merge pull request #128 from blueyed/vim-parse-in-function

Vim: parse function bodies for commands etc