NeuroSim: A circuit-level macro model for benchmarking neuro-inspired architectures in online learning