Improved selectInput/Output/Folder

This patch allows you to call selectInput() and similar functions in previous manner (synchronous method), and improves the flexibility of the new callback-based method.

This pull request consists of two feature-enhancement patches. One allows you to pass an additional object to callback function, and the other serves selectInput(String) in previous manner. Let me explain the former patch at first.


## Passing an object to the callback function

Example:
selectOutput("Save as...", "saverFunction", a_pg_graphic);
selectInput("Load CVS...", "loadCVSFile", target_table);

Background:
Passing an object to a callback function is a well-known technique to:
* identify the caller
* passing an object (or an array containing multiple objects)

Previously selectInput/Output/Folder just returned a file name and the caller was responsible to handle the file name. Now callback function has to handle the file name out of the context.

Instead of writing a number of callback functions (e.g. saveTable1(), saveTable2()...) or using a global variable, you can just pass an argument to a single function.


## Simulating previous behavior of selectInput/Output/Folder

Since Processing-2.0b7, selectInput() requires to pass a callback function and runs asynchronously. This is mandatory to make Processing stable, but many developers are confused. (e.g. #1254, [1](https://forum.processing.org/topic/nesting-two-selectinput-functions))

This patch allows you to call selectInput and its friends in the same manner to Processing 1.5. You can call selectInput() then it returns a string when the user finished to select a file, as it is in Processing 1.5. It uses a synchronized queue to pass the file name from the callback function to the caller, that means this patch does not stop any other thread.

Test code attached:

```java
class FileChooserOpener implements Runnable
{
  private int type;

  FileChooserOpener(int n) {
    type = n;
  };

  public void run() {
    for (int i=0; i<10; i++) {
      switch(type) {
      default:
      case 0:
        println(selectInput());
        break;
      case 1:
        println(selectOutput());
        break;
      case 2:
        println(selectFolder());
        break;
      }
    }
  }
}

Thread[] threads;

void setup()
{
  threads = new Thread[100];
  for (int i=0; i<100; i++) {
    Thread thread = new Thread(new FileChooserOpener(int(random(3))));
    thread.start();
  }
}
```