implement support for maps in jinterface

The API and implementation are simplistic, like for lists and tuples,
using arrays and without any connection to java.util.Map.