BrainSim: a simulation toolbox for researches in computational neuroscience and brain-inspired computation